From df3abc660a387831ea8186ed9a1daf693b81d445 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Mon, 17 May 2021 11:34:28 +0300 Subject: [PATCH 1/6] new design added with worklist and others --- Mohem/package.json | 21 +- Mohem/src/app/app-routing.module.ts | 69 ++--- .../services/connector/connector.service.ts | 58 ++-- .../device-permissions.service.ts | 32 +-- .../services-button.component.html | 6 +- Mohem/src/app/home/home.page.html | 9 +- Mohem/src/app/home/home.page.ts | 116 ++++---- .../app/itemforsale/home/home.component.html | 242 +++++++++++++++++ .../app/itemforsale/home/home.component.scss | 254 ++++++++++++++++++ .../itemforsale/home/home.component.spec.ts | 27 ++ .../app/itemforsale/home/home.component.ts | 26 ++ .../item-details/item-details.component.html | 61 +++++ .../item-details/item-details.component.scss | 35 +++ .../item-details.component.spec.ts | 27 ++ .../item-details/item-details.component.ts | 15 ++ .../src/app/itemforsale/itemforsale.module.ts | 48 ++++ .../src/app/itemforsale/itemforsale.page.html | 4 + .../src/app/itemforsale/itemforsale.page.scss | 1 + .../app/itemforsale/itemforsale.page.spec.ts | 27 ++ Mohem/src/app/itemforsale/itemforsale.page.ts | 15 ++ .../itemforsale/items/items.component.html | 187 +++++++++++++ .../itemforsale/items/items.component.scss | 108 ++++++++ .../itemforsale/items/items.component.spec.ts | 27 ++ .../app/itemforsale/items/items.component.ts | 21 ++ .../itemforsale/my-ads/my-ads.component.html | 11 + .../itemforsale/my-ads/my-ads.component.scss | 11 + .../my-ads/my-ads.component.spec.ts | 27 ++ .../itemforsale/my-ads/my-ads.component.ts | 15 ++ .../notification/service/worklist.service.ts | 14 +- .../work-list-replacement-roll.component.html | 189 +++++++------ .../work-list-replacement-roll.component.scss | 60 +++-- .../work-list-replacement-roll.component.ts | 204 ++++++++++---- .../worklist-main.component.html | 13 +- .../worklist-main.component.scss | 17 +- .../worklist-main/worklist-main.component.ts | 50 ++-- .../offersdiscount/home/home.component.html | 144 ++++++++++ .../offersdiscount/home/home.component.scss | 119 ++++++++ .../home/home.component.spec.ts | 27 ++ .../app/offersdiscount/home/home.component.ts | 19 ++ .../offer-details.component.html | 38 +++ .../offer-details.component.scss | 37 +++ .../offer-details.component.spec.ts | 27 ++ .../offer-details/offer-details.component.ts | 16 ++ .../offersdiscount/offersdiscount.module.ts | 41 +++ .../offersdiscount/offersdiscount.page.html | 3 + .../offersdiscount/offersdiscount.page.scss | 0 .../offersdiscount.page.spec.ts | 27 ++ .../app/offersdiscount/offersdiscount.page.ts | 15 ++ Mohem/src/assets/imgs/close.svg | 3 + Mohem/src/assets/imgs/delegate.svg | 5 + Mohem/src/assets/imgs/fav filled.svg | 3 + Mohem/src/assets/imgs/fav.svg | 3 + Mohem/src/assets/imgs/itemsforsale/add.svg | 3 + .../assets/imgs/itemsforsale/animal pers.svg | 9 + Mohem/src/assets/imgs/itemsforsale/arrow.svg | 3 + .../imgs/itemsforsale/book and sports.svg | 7 + Mohem/src/assets/imgs/itemsforsale/call.svg | 3 + Mohem/src/assets/imgs/itemsforsale/cars.svg | 6 + Mohem/src/assets/imgs/itemsforsale/delete.svg | 6 + Mohem/src/assets/imgs/itemsforsale/edit.svg | 5 + .../itemsforsale/electronic appliances.svg | 10 + .../src/assets/imgs/itemsforsale/fashion .svg | 6 + Mohem/src/assets/imgs/itemsforsale/filter.svg | 3 + .../assets/imgs/itemsforsale/furniture.svg | 8 + .../src/assets/imgs/itemsforsale/kid toys.svg | 3 + Mohem/src/assets/imgs/itemsforsale/mobile.svg | 5 + Mohem/src/assets/imgs/itemsforsale/other.svg | 19 ++ Mohem/src/assets/imgs/itemsforsale/sms.svg | 6 + .../assets/imgs/offers n discounts/banks.svg | 10 + .../imgs/offers n discounts/car care.svg | 6 + .../assets/imgs/offers n discounts/cloths.svg | 6 + .../imgs/offers n discounts/electronic.svg | 10 + .../imgs/offers n discounts/fitness.svg | 7 + .../imgs/offers n discounts/location.svg | 3 + .../imgs/offers n discounts/property.svg | 14 + .../imgs/offers n discounts/shipping.svg | 3 + .../imgs/offers n discounts/shopping.svg | 12 + .../imgs/offers n discounts/tourism.svg | 7 + Mohem/src/assets/imgs/req info.svg | 5 + Mohem/src/assets/localization/i18n.json | 121 +++++---- Mohem/src/theme/styles.scss | 21 +- Mohem/tsconfig.json | 5 +- 82 files changed, 2516 insertions(+), 390 deletions(-) create mode 100644 Mohem/src/app/itemforsale/home/home.component.html create mode 100644 Mohem/src/app/itemforsale/home/home.component.scss create mode 100644 Mohem/src/app/itemforsale/home/home.component.spec.ts create mode 100644 Mohem/src/app/itemforsale/home/home.component.ts create mode 100644 Mohem/src/app/itemforsale/item-details/item-details.component.html create mode 100644 Mohem/src/app/itemforsale/item-details/item-details.component.scss create mode 100644 Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts create mode 100644 Mohem/src/app/itemforsale/item-details/item-details.component.ts create mode 100644 Mohem/src/app/itemforsale/itemforsale.module.ts create mode 100644 Mohem/src/app/itemforsale/itemforsale.page.html create mode 100644 Mohem/src/app/itemforsale/itemforsale.page.scss create mode 100644 Mohem/src/app/itemforsale/itemforsale.page.spec.ts create mode 100644 Mohem/src/app/itemforsale/itemforsale.page.ts create mode 100644 Mohem/src/app/itemforsale/items/items.component.html create mode 100644 Mohem/src/app/itemforsale/items/items.component.scss create mode 100644 Mohem/src/app/itemforsale/items/items.component.spec.ts create mode 100644 Mohem/src/app/itemforsale/items/items.component.ts create mode 100644 Mohem/src/app/itemforsale/my-ads/my-ads.component.html create mode 100644 Mohem/src/app/itemforsale/my-ads/my-ads.component.scss create mode 100644 Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts create mode 100644 Mohem/src/app/itemforsale/my-ads/my-ads.component.ts create mode 100644 Mohem/src/app/offersdiscount/home/home.component.html create mode 100644 Mohem/src/app/offersdiscount/home/home.component.scss create mode 100644 Mohem/src/app/offersdiscount/home/home.component.spec.ts create mode 100644 Mohem/src/app/offersdiscount/home/home.component.ts create mode 100644 Mohem/src/app/offersdiscount/offer-details/offer-details.component.html create mode 100644 Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss create mode 100644 Mohem/src/app/offersdiscount/offer-details/offer-details.component.spec.ts create mode 100644 Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts create mode 100644 Mohem/src/app/offersdiscount/offersdiscount.module.ts create mode 100644 Mohem/src/app/offersdiscount/offersdiscount.page.html create mode 100644 Mohem/src/app/offersdiscount/offersdiscount.page.scss create mode 100644 Mohem/src/app/offersdiscount/offersdiscount.page.spec.ts create mode 100644 Mohem/src/app/offersdiscount/offersdiscount.page.ts create mode 100644 Mohem/src/assets/imgs/close.svg create mode 100644 Mohem/src/assets/imgs/delegate.svg create mode 100644 Mohem/src/assets/imgs/fav filled.svg create mode 100644 Mohem/src/assets/imgs/fav.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/add.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/animal pers.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/arrow.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/book and sports.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/call.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/cars.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/delete.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/edit.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/electronic appliances.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/fashion .svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/filter.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/furniture.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/kid toys.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/mobile.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/other.svg create mode 100644 Mohem/src/assets/imgs/itemsforsale/sms.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/banks.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/car care.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/cloths.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/electronic.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/fitness.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/location.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/property.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/shipping.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/shopping.svg create mode 100644 Mohem/src/assets/imgs/offers n discounts/tourism.svg create mode 100644 Mohem/src/assets/imgs/req info.svg diff --git a/Mohem/package.json b/Mohem/package.json index a096b849..27fec419 100755 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -27,17 +27,17 @@ "@ionic-native/background-geolocation": "^5.30.0", "@ionic-native/badge": "^5.18.0", "@ionic-native/barcode-scanner": "^5.18.0", - "@ionic-native/base64": "^5.18.0", + "@ionic-native/base64": "^5.32.1", "@ionic-native/ble": "^5.18.0", "@ionic-native/camera": "^5.18.0", "@ionic-native/core": "^5.8.0", "@ionic-native/date-picker": "^5.10.0", "@ionic-native/device": "^5.18.0", "@ionic-native/diagnostic": "^5.18.0", - "@ionic-native/file": "^5.18.0", - "@ionic-native/file-path": "^5.18.0", + "@ionic-native/file": "^5.32.1", + "@ionic-native/file-path": "^5.32.1", "@ionic-native/fingerprint-aio": "^5.18.0", - "@ionic-native/firebase-x": "^5.21.5", + "@ionic-native/firebase-x": "^5.32.1", "@ionic-native/geolocation": "^5.10.0", "@ionic-native/globalization": "^5.18.0", "@ionic-native/health": "^5.4.0", @@ -46,13 +46,13 @@ "@ionic-native/launch-navigator": "^5.17.0", "@ionic-native/local-notifications": "^5.17.0", "@ionic-native/native-storage": "^5.17.0", - "@ionic-native/nfc": "^5.30.0", + "@ionic-native/nfc": "^5.32.1", "@ionic-native/open-native-settings": "^5.14.0", "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/sqlite": "^5.18.0", "@ionic-native/status-bar": "^5.0.0", "@ionic-native/themeable-browser": "^5.18.0", - "@ionic-native/wifi-wizard-2": "^5.31.1", + "@ionic-native/wifi-wizard-2": "^5.32.1", "@ionic-native/zbar": "^5.10.0", "@ionic/angular": "^4.1.0", "@ng-bootstrap/ng-bootstrap": "^4.2.2", @@ -79,7 +79,7 @@ "cordova-plugin-device": "^2.0.3", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^6.0.2", - "cordova-plugin-filepath": "^1.5.6", + "cordova-plugin-filepath": "^1.6.0", "cordova-plugin-fingerprint-aio": "^3.0.0", "cordova-plugin-firebasex": "^7.0.2", "cordova-plugin-geolocation": "^4.0.2", @@ -93,18 +93,17 @@ "cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-themeablebrowser": "^0.2.18", "cordova-plugin-whitelist": "^1.3.4", - "cordova-plugin-wifiwizard2": "^3.1.1", "cordova-sqlite-storage": "^3.4.0", "cordova-support-google-services": "^1.3.2", "cordova.plugins.diagnostic": "^5.0.1", "core-js": "^2.5.4", "date-fns": "^1.30.1", "es6-promise-plugin": "^4.1.0", - "ionic2-calendar": "^0.5.8", - "ng-circle-progress": "^1.5.1", + "ionic2-calendar": "^0.5.10", + "ng-circle-progress": "^1.6.0", "ng2-file-upload": "^1.3.0", "ng2-pdf-viewer": "^5.3.2", - "ngx-gauge": "^1.0.0-beta.10", + "ngx-gauge": "^1.1.0", "npm": "^6.14.11", "phonegap-nfc": "^1.2.0", "phonegap-plugin-barcodescanner": "^8.1.0", diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts index 4139c84e..c2bbba01 100644 --- a/Mohem/src/app/app-routing.module.ts +++ b/Mohem/src/app/app-routing.module.ts @@ -1,33 +1,38 @@ -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' } +import { NgModule } from '@angular/core'; +import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; - -]; - -@NgModule({ - imports: [ - /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/ - RouterModule.forRoot(routes), - ], - exports: [RouterModule] -}) -export class AppRoutingModule { } + +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' } + + + +]; + +@NgModule({ + imports: [ + /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/ + RouterModule.forRoot(routes), + ], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index b18145b3..97a29e98 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,13 +27,13 @@ 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, - private events: Events, - public ts: TranslatorService) {} + public cs: CommonService, + private events: Events, + public ts: TranslatorService) { } public post( service: string, @@ -98,18 +98,18 @@ export class ConnectorService { public postNoLoad(service: string, data: any, onError: any, errorLabel?: string): Observable { return this.httpClient - .post( + .post( ConnectorService.host + service, data, ConnectorService.httpOptions) - .pipe( - timeout(ConnectorService.timeOut), - retry(ConnectorService.retryTimes), - tap((res) => { - this.handleResponse(res, onError, errorLabel, true); - }, (error) => { - this.handleError(error, onError, errorLabel, true); - })); + .pipe( + timeout(ConnectorService.timeOut), + retry(ConnectorService.retryTimes), + tap((res) => { + this.handleResponse(res, onError, errorLabel, true); + }, (error) => { + this.handleError(error, onError, errorLabel, true); + })); } // absolute url connection @@ -198,23 +198,23 @@ export class ConnectorService { let deviceToken = localStorage.getItem('deviceToken'); const requestGetLoginInfo = { - DeviceType: this.cs.getDeviceType(), - DeviceToken: deviceToken + DeviceType: this.cs.getDeviceType(), + DeviceToken: deviceToken }; - this.getLoginInfo(requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => { + this.getLoginInfo(requestGetLoginInfo, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => { if (this.cs.validResponse(res)) { - if (res.Mohemm_GetMobileLoginInfoList.length > 0) { - this.cs.sharedService.setSharedData(res.Mohemm_GetMobileLoginInfoList[0], 'imei-user-data'); - const user = true; - this.events.publish('user', user); - this.cs.openLogin(); - } else { - const user = false; - this.events.publish('user', user); - this.cs.openLogin(); - } - } else {} + if (res.Mohemm_GetMobileLoginInfoList.length > 0) { + this.cs.sharedService.setSharedData(res.Mohemm_GetMobileLoginInfoList[0], 'imei-user-data'); + const user = true; + this.events.publish('user', user); + this.cs.openLogin(); + } else { + const user = false; + this.events.publish('user', user); + this.cs.openLogin(); + } + } else { } }); } @@ -257,7 +257,7 @@ export class ConnectorService { this.cs.stopLoading(); this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => { console.log("presentAcceptDialog"); - this.cs.sharedService.clearAll(); + this.cs.sharedService.clearAll(); // this.cs.openLogin(); this.getLastLoginInfo(); }); diff --git a/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts b/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts index 01f7a2b9..dd938500 100644 --- a/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts +++ b/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts @@ -4,7 +4,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service import { Observable } from 'rxjs'; import { SubjectSubscriber } from 'rxjs/internal/Subject'; import { TranslatorService } from '../translator/translator.service'; -import { promise } from 'protractor'; + import { NativeStorage } from '@ionic-native/native-storage/ngx'; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; @@ -42,17 +42,17 @@ export class DevicePermissionsService { private requestCamera(observer: any) { this.hasCameraPermission().then((isAvailable) => { if (isAvailable) { - // this.requestMicophonePermission(observer); - this.observerDone(observer, true); + // this.requestMicophonePermission(observer); + this.observerDone(observer, true); } else { this.diagnostic.requestCameraAuthorization(true).then((value) => { // tslint:disable-next-line: triple-equals if (value == DevicePermissionsService.GRANTED) { // this.requestMicophonePermission(observer); this.observerDone(observer, true); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (value == DevicePermissionsService.DENIED_ALWAYS) { - // this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, true); + // this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, true); this.observerDone(observer, false); } else { this.observerDone(observer, false); @@ -84,7 +84,7 @@ export class DevicePermissionsService { // tslint:disable-next-line: triple-equals if (value == DevicePermissionsService.GRANTED) { this.observerDone(observer, true); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (value == DevicePermissionsService.DENIED_ALWAYS) { this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, true); this.observerDone(observer, false); @@ -113,15 +113,15 @@ export class DevicePermissionsService { observer.complete(); } - public async hasCameraPermission(): Promise { + public async hasCameraPermission(): Promise { return this.diagnostic.isCameraAuthorized(true); } - public async hasCameraAndMicPermissions(): Promise { + public async hasCameraAndMicPermissions(): Promise { const camera = await this.hasCameraPermission(); // let mic = await this.diagnostic.isMicrophoneAuthorized(); if (camera) { - // await this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, false); + // await this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, false); return true; } else { return false; @@ -218,8 +218,8 @@ export class DevicePermissionsService { // } // } else { if (await this.permissionRequestDialog(message)) { - return this.requestCameraPermission().toPromise(); - } + return this.requestCameraPermission().toPromise(); + } // } return false; } @@ -229,7 +229,7 @@ export class DevicePermissionsService { /* geolocation permission */ public async requestLocationAutherization() { - if ( await this.isLocationEnabled()) { + if (await this.isLocationEnabled()) { if (await this.hasLocationPermissions()) { return true; } else { @@ -240,8 +240,8 @@ export class DevicePermissionsService { // } // } else { if (await this.permissionRequestDialog(message)) { - return this.requestLocationPermission(); - } + return this.requestLocationPermission(); + } // } return false; } @@ -259,7 +259,7 @@ export class DevicePermissionsService { return isAvailable; } - public async hasLocationPermissions(): Promise { + public async hasLocationPermissions(): Promise { const location = await this.diagnostic.isLocationAvailable(); if (location) { await this.setAlwaysDenied(DevicePermissionsService.LOCATION, false); @@ -289,7 +289,7 @@ export class DevicePermissionsService { // tslint:disable-next-line: triple-equals if (value == DevicePermissionsService.GRANTED) { return true; - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (value == DevicePermissionsService.DENIED_ALWAYS) { this.setAlwaysDenied(DevicePermissionsService.LOCATION, true); } diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html index 3f9be5a5..f2e3b4a3 100644 --- a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html @@ -1,10 +1,14 @@
- + + + + +

{{title}}

diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 5cc9479e..b4ec28bb 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -57,7 +57,14 @@ - + + + + + + + + diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 268fe9c3..5a8e6ff7 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -37,7 +37,7 @@ import { WorklistMainService } from '../notification/service/work-list.main.serv import { isThisISOWeek } from 'date-fns'; import { Router } from '@angular/router'; import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; -import { NFC, Ndef} from "@ionic-native/nfc/ngx" +import { NFC, Ndef } from "@ionic-native/nfc/ngx" import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; @Component({ @@ -73,28 +73,28 @@ export class HomePage implements OnInit { show: true }, { - title: this.ts.trPK('home','worklist'), + title: this.ts.trPK('home', 'worklist'), statsValue: 0, icon: 'assets/icon/new-design/work_list.png', link: '1', show: true }, { - title: this.ts.trPK('home','missing-swipes'), + title: this.ts.trPK('home', 'missing-swipes'), statsValue: 0, icon: 'assets/icon/new-design/missing_swipe.png', link: '2', - show:true + show: true }, { - title: this.ts.trPK('home','leave-balance'), + title: this.ts.trPK('home', 'leave-balance'), statsValue: 0, icon: 'assets/icon/new-design/leave_balance.png', link: '3', show: this.isShow, }, { - title: this.ts.trPK('absenceList','tickets-balance'), + title: this.ts.trPK('absenceList', 'tickets-balance'), statsValue: 0, icon: 'assets/icon/new-design/ticket_balance.png', link: '4', @@ -182,7 +182,7 @@ export class HomePage implements OnInit { this.events.subscribe('getNotCount', badge => { this.notBadge = badge; }); - if(openDigitalIDCard === true){ + if (openDigitalIDCard === true) { console.log("DONE"); this.openDigitalId(); } @@ -269,11 +269,11 @@ export class HomePage implements OnInit { this.common.presentAlert(this.ts.trPK('home', 'position-error')); } }, (error) => { - this.common.presentAlert(this.ts.trPK('home', 'position-error')); + this.common.presentAlert(this.ts.trPK('home', 'position-error')); }); } else { - this.geolocation.getCurrentPosition({maximumAge: 3000, timeout: 10000, enableHighAccuracy: true}).then(resp => { - if(resp && resp.coords.latitude && resp.coords.longitude) { + this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { + if (resp && resp.coords.latitude && resp.coords.longitude) { this.lat = resp.coords.latitude; this.longt = resp.coords.longitude; this.attendance(); @@ -283,7 +283,7 @@ export class HomePage implements OnInit { }).catch(error => { this.common.presentAlert(this.ts.trPK('home', 'position-error')); }); - } + } } else { return false; } @@ -293,11 +293,11 @@ export class HomePage implements OnInit { setServicesPrivilage() { for (const servicePrivilage of AuthenticationService.servicePrivilage) { if (servicePrivilage.Previlege === false) { - if(servicePrivilage.ServiceName === 'accrualBalance'){ + if (servicePrivilage.ServiceName === 'accrualBalance') { this.statsButtons[3].show = false; this.statsButtons[4].show = false; } - if(servicePrivilage.ServiceName === 'vacationRule'){ + if (servicePrivilage.ServiceName === 'vacationRule') { this.showVcationRule = false; } // document @@ -305,7 +305,7 @@ export class HomePage implements OnInit { // .setAttribute('disabled', 'disabled'); // document.getElementById(servicePrivilage.ServiceName).style.filter = // 'grayscale(1)'; - }else{ + } else { this.statsButtons[3].show = true; this.statsButtons[4].show = true; this.showVcationRule = true; @@ -344,11 +344,11 @@ export class HomePage implements OnInit { ); if (this.common.getUpdateImage().status) { this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + this.common.getUpdateImage().img); - } else { - this.userImage = user.EMPLOYEE_IMAGE - ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE - : this.userImage; - } + } else { + this.userImage = user.EMPLOYEE_IMAGE + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : this.userImage; + } this.callDashboardServices(); } else { console.log(user); @@ -403,12 +403,12 @@ export class HomePage implements OnInit { for (let i = 0; i < this.menuList.length; i++) { if (this.menuList[i].MENU_TYPE === 'M') { this.events.publish('myTeamFlag', 'true'); - // this.common.sharedService.setSharedData('true', "myTeamFlag"); + // this.common.sharedService.setSharedData('true', "myTeamFlag"); } } // if (item.MENU_TYPE === 'M') { - // this.common.openMyTeamPage(); + // this.common.openMyTeamPage(); // // this.navCtrl.push("MySubordinatePage"); // } else if (item.MENU_TYPE === 'S') { // this.common.sharedService.setSharedData(item, 'mySpecList'); @@ -480,15 +480,15 @@ export class HomePage implements OnInit { for (let i = 0; i < result.GetMenuEntriesList.length; i++) { // tslint:disable-next-line: triple-equals if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') { - this.ticketRequestObject = result.GetMenuEntriesList[i]; - // tslint:disable-next-line: triple-equals + this.ticketRequestObject = result.GetMenuEntriesList[i]; + // tslint:disable-next-line: triple-equals } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HR_LOA_SS') { this.leaveRequestObject = result.GetMenuEntriesList[i]; - // tslint:disable-next-line: triple-equals - } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { - this.missingSwipeRequestObject = result.GetMenuEntriesList[i]; - } - } + // tslint:disable-next-line: triple-equals + } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { + this.missingSwipeRequestObject = result.GetMenuEntriesList[i]; + } + } this.sortMenuEntires(result.GetMenuEntriesList); } } @@ -541,12 +541,12 @@ export class HomePage implements OnInit { request.QRValue = this.scannedResult.text; request.UID = this.deviceID; request.EmployeeID = this.userData.EMPLOYEE_NUMBER; - this.attendanceService.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');}) + this.attendanceService.fakeAttendanceSwipeScanner(request, () => { console.log('Error inside in swipe attendance'); }) .subscribe((result: Response) => { if (this.common.validResponse(result)) { - this.common.presentAlert(this.ts.trPK('home', 'fake-location')); + this.common.presentAlert(this.ts.trPK('home', 'fake-location')); } - }); + }); } swipeAttendance() { @@ -575,7 +575,7 @@ export class HomePage implements OnInit { // Dashboard Services showOrganizationSalaries() { this.DS.getOrganizationSalaries().subscribe( - (result: OrganizationSalariesResponse) => {} + (result: OrganizationSalariesResponse) => { } ); } @@ -592,7 +592,7 @@ export class HomePage implements OnInit { showPerformanceAppraisal() { this.DS.getPerformanceAppraisal().subscribe( - (result: PerformanceAppraisalResponse) => {} + (result: PerformanceAppraisalResponse) => { } ); } @@ -604,7 +604,7 @@ export class HomePage implements OnInit { return seconds; } -convertAndAssignTime(data) { + convertAndAssignTime(data) { this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':')); this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':')); this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':')); @@ -614,22 +614,22 @@ convertAndAssignTime(data) { } else if (this.isCheckedIn && this.remainingTime === 0) { this.percent = 100; } -} + } -showAttendanceTracking() { - const request = { - P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER - }; - this.DS.getAttendanceTracking(request, '', '', this.isPostNoLoad).subscribe((result: AttendanceTrackingResponse) => { + showAttendanceTracking() { + const request = { + P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER + }; + this.DS.getAttendanceTracking(request, '', '', this.isPostNoLoad).subscribe((result: AttendanceTrackingResponse) => { if (this.common.validResponse(result)) { clearTimeout(this.intervalCountdown); const key = 'GetAttendanceTrackingList'; this.convertAndAssignTime(result[key]); } }); -} + } -openPeriodDateDashbored() { + openPeriodDateDashbored() { this.DS.getOpenPeriodDates(() => { console.log('Error '); }).subscribe((result: OpenPeriodDatesResponse) => { if (this.common.validResponse(result)) { console.log('response'); @@ -654,7 +654,7 @@ openPeriodDateDashbored() { ITGCountAllNotification() { this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => { this.statsButtons[1].statsValue = - Math.floor(this.countAllNotification + result.TotalCount); + Math.floor(this.countAllNotification + result.TotalCount); this.common.stopLoading(); }); } @@ -673,7 +673,7 @@ openPeriodDateDashbored() { }); } -getSubordinatesAttStatus() { + getSubordinatesAttStatus() { const request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest(); request.P_SCHEDULE_DATE_FROM = '/Date(1578603600000+0300)/'; // test request.P_SCHEDULE_DATE_TO = '/Date(1576011600000+0300)/'; // test @@ -732,7 +732,7 @@ getSubordinatesAttStatus() { for (const accrualBalance of result.GetAccrualBalancesList) { if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') { this.statsButtons[3].statsValue = - Math.floor(accrualBalance.ACCRUAL_NET_ENTITLEMENT); + Math.floor(accrualBalance.ACCRUAL_NET_ENTITLEMENT); this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance'); this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); @@ -745,13 +745,13 @@ getSubordinatesAttStatus() { }); } -openattentracking() { + openattentracking() { this.common.openAttenTrackingpage(); -} + } -public showAttendanceOptions() { - this.common.openAttendanceOptionsComponent(); -} + public showAttendanceOptions() { + this.common.openAttendanceOptionsComponent(); + } openStatsButton(link: any) { // tslint:disable-next-line: triple-equals @@ -759,19 +759,19 @@ public showAttendanceOptions() { this.isFakeLocationUsed = false; // this.getDeviceLocation(); this.showAttendanceOptions(); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '1') { this.common.startLoading(); this.common.openNotificationPage(); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '2') { this.openPage(this.missingSwipeRequestObject); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '3') { this.openPage(this.leaveRequestObject); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '4') { - this.openPage(this.ticketRequestObject); + this.openPage(this.ticketRequestObject); } } @@ -782,4 +782,10 @@ public showAttendanceOptions() { }); return await modal.present(); } + itemForSale() { + this.common.navigateForward('/itemforsale/home'); + } + offersDiscount() { + this.common.navigateForward('/offersdiscount/home'); + } } diff --git a/Mohem/src/app/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html new file mode 100644 index 00000000..ef0a3a6c --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -0,0 +1,242 @@ + + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+
+
+
+
+
+
Select Category
+
Completed
+
+
+
+
+
+
Add Details
+ +
{{step >2 ? "Completed" : "Locked"}}
+
+
+
+
+
+
Review & Sell
+
{{step >3 ? "Completed" : "Locked"}}
+
+
+
+
+
+ + + +
+

What are you offering?

+
+ + + +
+
+ +
+
+

Mobile & Tablets

+
+
+
+ +
+
+ +
+
+

Mobile & Tablets

+
+
+
+ +
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+ + + +
+
+ +
+
+

Mobile & Tablets

+
+
+
+ +
+
+ +
+
+

Mobile & Tablets

+
+
+
+ +
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+

Add Details

+
+
+ + +

Item Info

+ + + + + +
+ + + + + + + + + + + + + + +

Item Condition

+ + + + + + + New + + + + Used + + + + +
+
+ + + + +

Item Price

+ + + +
+
+ + +

Item Photos

+
+ + +
+
+
X
+ +
+ +
+
+ +
+
+
X
+ +
+ +
+
+ +
+ + + +
+
+ +
+

Review & Sell

+
+ + +
+

Furniture Table

+ + + +

+ Consectetur adipiscing elit. Donec blandit diam nulla, non euismod eros efficitur imperdiet. Fusce erat enim, volutpat at enim in, venenatis iaculis risus. +

+
+

Used

+ + + +
+ + + Selling for

500 SAR

+
+
+ This ad will be valid for 2 week after approval +
+
+ +
+ +
+ + + + + +
+ + {{ts.trPK('general','next')}} + + + {{ts.trPK('general','submit')}} +
+
+ +
\ No newline at end of file diff --git a/Mohem/src/app/itemforsale/home/home.component.scss b/Mohem/src/app/itemforsale/home/home.component.scss new file mode 100644 index 00000000..5b417ab3 --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.scss @@ -0,0 +1,254 @@ +.md-stepper-horizontal { + + width: 90%; + margin: 0 auto; + background-color: #FFFFFF; + box-shadow: 0 3px 8px -6px #DDDDDD; + + margin: auto; + position: relative; + border-radius: 25px; +} +.md-stepper-horizontal .md-step { + display:table-cell; + position:relative; + padding:24px; +} +.md-stepper-horizontal .md-step:hover, +.md-stepper-horizontal .md-step:active { + background-color:rgba(0,0,0,0.04); +} +.md-stepper-horizontal .md-step:active { + border-radius: 15% / 75%; +} +.md-stepper-horizontal .md-step:first-child:active { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.md-stepper-horizontal .md-step:last-child:active { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.md-stepper-horizontal .md-step:hover .md-step-circle { + background-color:#757575; +} +.md-stepper-horizontal .md-step:first-child .md-step-bar-left, +.md-stepper-horizontal .md-step:last-child .md-step-bar-right { + display:none; +} +.md-stepper-horizontal .md-step .md-step-circle { + width:30px; + height:30px; + margin:0 auto; + background-color:#999999; + border-radius: 50%; + text-align: center; + line-height:30px; + font-size: 16px; + font-weight: 600; + color:#FFFFFF; +} +.md-stepper-horizontal.green .md-step.active .md-step-circle { + background-color:#00AE4D; +} +.md-stepper-horizontal.orange .md-step.active .md-step-circle { + background-color:#CC9B14; +} +.md-stepper-horizontal .md-step.active .md-step-circle { + background-color: rgb(33,150,243); +} +.md-stepper-horizontal .md-step.done .md-step-circle:before { + font-family:'FontAwesome'; + font-weight:100; + content: "\f00c"; +} +.md-stepper-horizontal .md-step.done .md-step-circle *, +.md-stepper-horizontal .md-step.editable .md-step-circle * { + display:none; +} +.md-stepper-horizontal .md-step.editable .md-step-circle { + -moz-transform: scaleX(-1); + -o-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + transform: scaleX(-1); +} +.md-stepper-horizontal .md-step.editable .md-step-circle:before { + font-family:'FontAwesome'; + font-weight:100; + content: "\f040"; +} +.md-stepper-horizontal .md-step .md-step-title { + margin-top: 10px; + font-size: 15px; + font-weight:bold; +} +.md-stepper-horizontal .md-step .md-step-title, +.md-stepper-horizontal .md-step .md-step-optional { + text-align: center; + color:rgba(0,0,0,.26); +} +.md-stepper-horizontal .md-step.active .md-step-title { + font-weight: 600; + color:rgba(0,0,0,.87); +} +.md-stepper-horizontal .md-step.active.done .md-step-title, +.md-stepper-horizontal .md-step.active.editable .md-step-title { + font-weight:600; +} +.md-stepper-horizontal .md-step .md-step-optional { + font-size:12px; +} + +.md-stepper-horizontal .md-step .md-step-bar-left, +.md-stepper-horizontal .md-step .md-step-bar-right { + position:absolute; + top:36px; + height:1px; + border-top:1px solid #DDDDDD; +} +.md-stepper-horizontal .md-step .md-step-bar-right { + right:0; + left:50%; + margin-left:20px; +} +.md-stepper-horizontal .md-step .md-step-bar-left { + left:0; + right:50%; + margin-right:20px; +} +.header{ + height: 150px; + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 88%; + width: 100%; + position: absolute; + background: #F5F5F5; + top: 20%; +} +.md-step-optional{ + font-size: 12px; + background: #cccccc; + color: #ffffff !important; + padding: 2px; + border-radius: 5px; + margin: 5px; +} +.orange .md-step-optional{ + font-size: 12px; + background: #CC9B14; + color: #ffffff !important; + padding: 2px; + border-radius: 5px; +} +.green .md-step-optional{ + font-size: 12px; + background-color:#00AE4D; + color: #ffffff !important; + padding: 2px; + border-radius: 5px; +} +.green .md-step-circle{ + background-color:#00AE4D !important; +} +.orange .md-step-circle{ + background: #CC9B14 !important; +} +.content{ +position: relative; +} +.offering{ + font-weight: bold; + margin:20px; + position: relative; +} +.offering h2{ + font-weight: bold; +} +.sale-icon{ + box-shadow: 1px 1px 5px 1px #cccc; + padding: 10px; + margin: 5px; + border-radius: 10px; + background: #fff; +} +.sale-icon ion-icon{ + font-size: 35px; +} +.sale-icon p{ + margin-top:5px; +} +.add-details{ + background: #fff; + margin: 15px; + padding: 10px; + box-shadow: 3px 4px 3px -1px #ccc; + border-radius: 20px; +} +.add-details ion-item{ + border-radius: 25px; + border: 1px solid #cdcd; + padding: 5px; +} +.add-details p{ + font-weight: bold; + font-size: 18px; +} +.add-details ion-label{ + margin: 10px; + position: relative; + bottom: 3px; +} +.add-details ion-radio { + --color-checked: #009688; +} +.image-container{ + position: relative; + height: 70px; +} +.image-container .uploaded{ +position: absolute; +} +.image-container .uploaded .closed{ + position: absolute; + right: 0; + font-size: 14px; + color: #fff; + top: -15px; + right: -10px; + font-weight: bolder; + background: red; + padding: 6px; + border-radius: 50%; + text-align: center; + line-height: .7; +} +.image-container .uploaded img{ + width: 70px; +} +.footer-button{ + background: var(--newgreen)!important;border-radius: 10px; --background: transparent; + width: 80%; +} +.description-details .orange{ +color:orange +} +.description-details img{ + margin:10px; +} +.waring{color: red; + padding: 10px; + font-size: 14px;} +.selling h2{ + display: inline-block; + font-weight: bolder; +} +.flaot-button{float:right;margin:30px} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/home/home.component.spec.ts b/Mohem/src/app/itemforsale/home/home.component.spec.ts new file mode 100644 index 00000000..5ec1377b --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.spec.ts @@ -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; + + 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(); + }); +}); diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts new file mode 100644 index 00000000..8e42704a --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.ts @@ -0,0 +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'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'], +}) +export class HomeComponent implements OnInit { + step: any = 1; + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + openItem() { + + + this.cs.navigateForward('/itemforsale/items'); + } + nextStep() { + this.step = 2; + } + openMyAds() { + this.cs.navigateForward('/itemforsale/my-ads'); + } +} diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.html b/Mohem/src/app/itemforsale/item-details/item-details.component.html new file mode 100644 index 00000000..9e69b2c2 --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.html @@ -0,0 +1,61 @@ + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+
+
+
+ + + + + Furniture Table + + + + 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. +
+

New

+

500 SAR

+
+ + + + +
+ + + + + +

Aslam Khan

+

Published on 22 April 2020

+

View Profile

+
+ +
+ +
+
+ + +
+
+ + + +
+ + {{ts.trPK('sms','title')}} + + + {{ts.trPK('vacation-rule','call')}} +
+
+
\ No newline at end of file diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.scss b/Mohem/src/app/itemforsale/item-details/item-details.component.scss new file mode 100644 index 00000000..f20e56fc --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.scss @@ -0,0 +1,35 @@ +.header{ + height: 150px; + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 88%; + width: 100%; + position: absolute; + background: #F5F5F5; + top: 20%; +} +ion-card-header{ + background-color: #fff; + padding: 15px !important; +} +.content-bottom{ + padding: 15px; +} +.green{ + color:green; + font-weight: bold; +} +.content-bottom h1{ + font-size: 24px; +} +.details-button ion-button{ + --background: #565656; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts b/Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts new file mode 100644 index 00000000..d730d52f --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ItemDetailsComponent } from './item-details.component'; + +describe('ItemDetailsComponent', () => { + let component: ItemDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ItemDetailsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ItemDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.ts b/Mohem/src/app/itemforsale/item-details/item-details.component.ts new file mode 100644 index 00000000..cae7ea97 --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.ts @@ -0,0 +1,15 @@ +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'; + +@Component({ + selector: 'app-item-details', + templateUrl: './item-details.component.html', + styleUrls: ['./item-details.component.scss'], +}) +export class ItemDetailsComponent implements OnInit { + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + +} diff --git a/Mohem/src/app/itemforsale/itemforsale.module.ts b/Mohem/src/app/itemforsale/itemforsale.module.ts new file mode 100644 index 00000000..bde723c4 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.module.ts @@ -0,0 +1,48 @@ +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 { ItemforsalePage } from './itemforsale.page'; +import { HomeComponent } from './home/home.component'; +import { ItemsComponent } from './items/items.component'; +import { ItemDetailsComponent } from './item-details/item-details.component'; +import { MyAdsComponent } from './my-ads/my-ads.component'; + +const routes: Routes = [ + { + path: '', + component: ItemforsalePage, + children: [ + { + path: 'home', + component: HomeComponent + }, + { + path: 'items', + component: ItemsComponent + }, + { + path: 'items-details', + component: ItemDetailsComponent + }, + { + path: 'my-ads', + component: MyAdsComponent + } + ], + } +]; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + RouterModule.forChild(routes) + ], + declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent] +}) +export class ItemforsalePageModule { } diff --git a/Mohem/src/app/itemforsale/itemforsale.page.html b/Mohem/src/app/itemforsale/itemforsale.page.html new file mode 100644 index 00000000..d26b79fd --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/itemforsale.page.scss b/Mohem/src/app/itemforsale/itemforsale.page.scss new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.scss @@ -0,0 +1 @@ + diff --git a/Mohem/src/app/itemforsale/itemforsale.page.spec.ts b/Mohem/src/app/itemforsale/itemforsale.page.spec.ts new file mode 100644 index 00000000..e630eb19 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ItemforsalePage } from './itemforsale.page'; + +describe('ItemforsalePage', () => { + let component: ItemforsalePage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ItemforsalePage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ItemforsalePage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/itemforsale.page.ts b/Mohem/src/app/itemforsale/itemforsale.page.ts new file mode 100644 index 00000000..b997aec1 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-itemforsale', + templateUrl: './itemforsale.page.html', + styleUrls: ['./itemforsale.page.scss'], +}) +export class ItemforsalePage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/Mohem/src/app/itemforsale/items/items.component.html b/Mohem/src/app/itemforsale/items/items.component.html new file mode 100644 index 00000000..3b1d5d63 --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.html @@ -0,0 +1,187 @@ + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+
+ + + Item for sale + + + My Posted Ads + + +
+
+
+ +
+ + + + + + + + + + + +

Browse Category

+
+ + + +
+
+ +
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+ + + + + + + + Card Title + + + + Keep close to Nature's heart... and break +

+ Used +

+ + + + 500 SAR + + + + + + + +
+
+
+ + + + + + Card Title + + + + Keep close to Nature's heart... and break +

+ New +

+ + + + 500 SAR + + + + + + + +
+
+
+
+
+ +
+ + + + + + +

Furniture Table

+

good condition only 6th month used with bed and mattress

+ + +

Pending Review

+
+ + + + +
+
+ +
+
+
+ + +
+ + {{ts.trPK('general','next')}} + +
+
+ +
+ \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/items/items.component.scss b/Mohem/src/app/itemforsale/items/items.component.scss new file mode 100644 index 00000000..01fd8409 --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.scss @@ -0,0 +1,108 @@ + +.header{ + + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 100%; + width: 100%; + position: absolute; + background: #F5F5F5; + +} + +.SearchtextBox{ + margin: 10px; + border-radius: 20px; +} +.filterText{ + margin: 5px 15px 15px; + font-size: 18px; + font-weight: bold; +} +.container-icon{ + padding: 0 10px 20px; + position: relative; + white-space:nowrap; + overflow-x:auto; +} + +.box-icon{ + width: 100px; + height: 100px; + margin: 0px; + display: inline-block; +} +.sale-icon{ + box-shadow: 1px 1px 5px 1px #cccc; + padding: 5px; + margin: 5px; + border-radius: 10px; + background: #fff; +} +.sale-icon ion-icon{ + font-size: 25px; +} +.sale-icon p{ + margin-top:5px; +} +.bottom-icon{ + text-overflow: clip; + white-space: normal; +} +ion-card-header{ + background: #fff; +} +ion-card-header img{ + margin:15px auto; +} +ion-card-title{ + + font-weight: bold; + font-size: 18px; + padding: 5px; +} +.orange{ + color: orange; +} +.green{ + color:#00AE4D; +} +ion-segment-button ion-label{ + padding: 0; + font-size: 12px; +} +.segment-button-checked ion-label{ +color: #fff !important; +} +.segment-button-checked{ + background: rgb(46, 46, 46); +} +ion-item{ + --background: #fff; + margin: 10px; + border-radius: 25px; + padding: 5px; +} +ion-item h3{ + color: #000; + font-weight: bold; + font-size: 16px; +} +.yellow{ + color:#ffc107; +} + +ion-item .icon{ +margin: 5px; +} +.edit{ + margin-left:20px !important; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/items/items.component.spec.ts b/Mohem/src/app/itemforsale/items/items.component.spec.ts new file mode 100644 index 00000000..5fb9a465 --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ItemsComponent } from './items.component'; + +describe('ItemsComponent', () => { + let component: ItemsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ItemsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ItemsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/items/items.component.ts b/Mohem/src/app/itemforsale/items/items.component.ts new file mode 100644 index 00000000..f93913bb --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.ts @@ -0,0 +1,21 @@ +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'; + +@Component({ + selector: 'app-items', + templateUrl: './items.component.html', + styleUrls: ['./items.component.scss'], +}) +export class ItemsComponent implements OnInit { + segment: any = '1'; + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + openDetails() { + this.cs.navigateForward('/itemforsale/items-details'); + } + segmentChanged(value) { + this.segment = value.detail.value; + } +} diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.html b/Mohem/src/app/itemforsale/my-ads/my-ads.component.html new file mode 100644 index 00000000..935e7403 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.html @@ -0,0 +1,11 @@ + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+ +
\ No newline at end of file diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.scss b/Mohem/src/app/itemforsale/my-ads/my-ads.component.scss new file mode 100644 index 00000000..ba158bb6 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.scss @@ -0,0 +1,11 @@ +.header{ + height: 150px; + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts b/Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts new file mode 100644 index 00000000..992ee2d6 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MyAdsComponent } from './my-ads.component'; + +describe('MyAdsComponent', () => { + let component: MyAdsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MyAdsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MyAdsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.ts b/Mohem/src/app/itemforsale/my-ads/my-ads.component.ts new file mode 100644 index 00000000..5c5b34b2 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.ts @@ -0,0 +1,15 @@ +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'; + +@Component({ + selector: 'app-my-ads', + templateUrl: './my-ads.component.html', + styleUrls: ['./my-ads.component.scss'], +}) +export class MyAdsComponent implements OnInit { + + constructor(public ts: TranslatorService, public cs: CommonService,) { } + ngOnInit() { } + +} diff --git a/Mohem/src/app/notification/service/worklist.service.ts b/Mohem/src/app/notification/service/worklist.service.ts index 2c719e86..c53b6f8a 100644 --- a/Mohem/src/app/notification/service/worklist.service.ts +++ b/Mohem/src/app/notification/service/worklist.service.ts @@ -15,7 +15,8 @@ export class WorklistService { public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST'; public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST'; public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY'; - + public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements'; + public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements'; constructor( public api: ConnectorService, public authService: AuthenticationService, @@ -50,4 +51,15 @@ export class WorklistService { return this.api.post(WorklistService.getActionHistory, request, onError, errorLabel); } + public getFavorite(req: any, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(req); + return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); + } + public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable { + var req: any = {}; + req['Mohemm_ChangeReplacementsInputList'] = request; + this.authService.authenticateRequest(req); + + return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel); + } } \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index 2a655824..56c8215a 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -1,8 +1,11 @@ - {{ 'replacementRoll, title' | translate}} + {{ 'replacementRoll, title' | translate}} + {{ 'worklistMain, request' | translate}} + {{ 'worklistMain, delegate' | translate}} + @@ -10,49 +13,40 @@
- - - {{'replacementRoll, searchBy' | translate}} - - {{'addAttach, name' | translate}} - {{'login, username' | translate}} - {{'general, email' | translate}} - - + + + + {{'replacementRoll, searchBy' | translate}} + + + + + + {{'addAttach, name' | translate}} + + + + {{'login, username' | translate}} + + + + {{'general, email' | translate}} + + + - - - - - - - - - - + + + + + + - - - -
@@ -65,40 +59,62 @@
-
- - - - - - +
+
+
+ +
+
+
+ {{'replacementRoll, favorite' | translate}} +
- - +
+
+
+ + + + + + {{employee.EMPLOYEE_DISPLAY_NAME}} + + +
+ +
+
+
+
+
+
+ {{'replacementRoll, search-result' | translate}} +
+
+ + +
@@ -106,32 +122,27 @@ -
+ - + {{employee.EMPLOYEE_DISPLAY_NAME}} + + +
+ +
+
-
- -
- -
- - - {{employee.EMPLOYEE_DISPLAY_NAME}} -
{{employee.USER_NAME}}
- {{employee.EMAIL_ADDRESS}} -
-
+
- + + + - +
- - - + @@ -146,7 +157,7 @@ -
+
{{"replacementRoll, enterNote" | translate}} @@ -156,10 +167,10 @@

- + {{'general, submit' | translate}} - + {{'general, cancel' | translate}}
\ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss index 5fbd6377..2ff64c1b 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss @@ -3,10 +3,12 @@ button.item-button.button.button-md.button-clear.button-clear-md { } .footer-button { - border-radius: 3px; - padding: 0 1.1em; - min-height: 45px; - min-width: 200px; + background: #dbdbdb; + border-radius: 10px; + color: black; + --background: transparent; + font-weight: bold; + width: 75%; } // ion-item { @@ -27,8 +29,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { .profileImageDiv{ - text-align: center; - margin-bottom: -27px; + z-index: 3; position: relative; top: 0; @@ -36,8 +37,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { } .profileImage{ width:60px !important; - // margin-left: -25px; - // margin-right: 22px; + } .activated{ @@ -127,7 +127,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { } .square{ // width:calc(100% / 2); - width:50%; + width:100%; float:left; position: relative; // padding-bottom: calc(100% / 2); @@ -152,9 +152,39 @@ button.item-button.button.button-md.button-clear.button-clear-md { } - - - - - - +.radio-label{ + margin: 4px; + position: relative; + bottom: 4px; +} +ion-radio{ + --color-checked: #269db8; + } +.center{text-align: center;} +.boldTxtNav{ + font-weight: bold; +} +.employee-details{ + display:inline-block; + margin: 10px; +} +.empImgeRep{ + display: inline-block; + height: 40px; + width: 40px; +} +.star-fav{ + float: right; + margin: 15px; +} +.uk-margin{margin: 15px 0px 0px 15px; + font-weight: bold; + clear: both; + position: relative; + top: 10px;} +.uk-padding{ padding: 20px;} +.uk-padding .employee-details{ + bottom: 10px; + position: relative;} + + \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index 1db43447..ac0e9cd5 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -30,33 +30,39 @@ export class WorkListReplacementRollComponent implements OnInit { P_PAGE_NUM: number; P_PAGE_LIMIT: number; ReplacementList: any = []; - searchBy: string = ""; + searchBy: string = "1"; IsReachEnd: boolean = false; ReplacmentListRes: WorKListReplacmentEmployeeResponse; private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest(); private WorkListActionObj: WorkListActionRequest; getpassResAttr: any = []; active: any; - demoeAttach:any=[]; - isSelect: boolean =false; + demoeAttach: any = []; + isSelect: boolean = false; searchKeyEnter: boolean = false; - messageSuccess: boolean =false; + messageSuccess: boolean = false; public direction: string; P_RESPOND_ATTRIBUTES_TBL: any[]; + typingTimer: any; + userSelected: boolean; + actionHistory: [] = []; + favoriteUserList: [] = []; constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; this.P_PAGE_LIMIT = 50; this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false); console.log(this.getPassActionMode); - + this.getFavruite(); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false); console.log(this.getpassResAttr); this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false); + + this.actionHistory = this.cs.sharedService.getSharedData('actionHistoryData', false); if (this.getPassActionMode == "ANSWER_INFO") { this.isAnswer = true; } - + this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; @@ -65,12 +71,17 @@ export class WorkListReplacementRollComponent implements OnInit { this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; this.WorkListActionObj.P_ACTION_MODE = ""; this.WorkListActionObj.P_COMMENTS = ""; - this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr; + this.WorkListActionObj.RespondAttributeList = [];// this.getpassResAttr; this.WorkListActionObj.P_APPROVER_INDEX = null; this.direction = TranslatorService.getCurrentLanguageName(); + var requestInfoDel = this.cs.sharedService.getSharedData('requestInfoDelUser'); + if (requestInfoDel != null) { + this.userSelected = true; + this.inputSearch = requestInfoDel.NAME; + } } - ngOnInit() { + ngOnInit() { } @@ -178,10 +189,13 @@ export class WorkListReplacementRollComponent implements OnInit { } - select(selectEmp,index){ + select(selectEmp, index) { console.log(selectEmp.EMPLOYEE_DISPLAY_NAME); - this.selEmp=selectEmp - this.active=index; + this.selEmp = selectEmp + this.active = index; + this.userSelected = true; + this.inputSearch = selectEmp.EMPLOYEE_DISPLAY_NAME ? selectEmp.EMPLOYEE_DISPLAY_NAME : selectEmp.NAME; + this.getreplacmentemployee(); } clear() { this.selEmpName = ""; @@ -208,18 +222,18 @@ export class WorkListReplacementRollComponent implements OnInit { } submitAction() { - + if (this.selEmp && this.isAnswer == false) { // this.selectedUserInf = this.ReplacementList[this.selEmp]; - this.selectedUserInf = this.selEmp; - console.log("selEmp "+ this.selEmp.USER_NAME); + this.selectedUserInf = this.selEmp; + console.log("selEmp " + this.selEmp.USER_NAME); if (this.selectedUserInf && this.selectedUserInf.USER_NAME) { - - console.log("userInfo "+this.selectedUserInf.USER_NAME); + + console.log("userInfo " + this.selectedUserInf.USER_NAME); if (this.userNote) { - - if(this.getPassActionMode == "APPROVE_AND_FORWARD" || this.getPassActionMode == "FORWARD"){ + + if (this.getPassActionMode == "APPROVE_AND_FORWARD" || this.getPassActionMode == "FORWARD") { let index_FORWARD = this.getpassResAttr.findIndex(x => x.ATTRIBUTE_NAME === "FORWARD_TO_USERNAME_RESPONSE"); this.getpassResAttr[index_FORWARD].ATTRIBUTE_TEXT_VALUE = this.selectedUserInf.USER_NAME; @@ -227,30 +241,38 @@ export class WorkListReplacementRollComponent implements OnInit { let index_Note = this.getpassResAttr.findIndex(x => x.ATTRIBUTE_NAME === "NOTE"); this.getpassResAttr[index_Note].ATTRIBUTE_TEXT_VALUE = this.userNote; - this.P_RESPOND_ATTRIBUTES_TBL= this.getpassResAttr; + this.P_RESPOND_ATTRIBUTES_TBL = this.getpassResAttr; console.log(this.P_RESPOND_ATTRIBUTES_TBL); this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; - this.WorkListActionObj.P_COMMENTS =""// response Attr + this.WorkListActionObj.P_COMMENTS = ""// response Attr this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; - }else{ + } else { + - - - this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; - this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; - this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr - // this.modalCtrl.dismiss(); + + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; + this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; + this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr + // this.modalCtrl.dismiss(); } + + + this.workListMainService.actionButton(this.WorkListActionObj). subscribe((result: any) => { - this.handleApplayActionResult(result); + if (this.cs.validResponse(result)) { + if (result.MessageStatus == 1) { + + this.handleApplayActionResult(result); + } + } }); - + } else { let msg: string = this.ts.trPK("replacementRoll", "enterNote"); this.cs.showErrorMessageDialog(() => { @@ -291,21 +313,23 @@ export class WorkListReplacementRollComponent implements OnInit { if (result.MessageStatus == 1) { this.cs.sharedService.setSharedData(true, 'loadWorkList'); - - this.messageSuccess = true; - setTimeout(() => { - this.messageSuccess = false; - //this.modalCtrl.dismiss(succ); - this.modalCtrl.dismiss({ - 'dismissed': true, - data: "Success" - }); - }, 5000); + this.messageSuccess = true; - this.cs.openNotificationPage(); - } + setTimeout(() => { + this.messageSuccess = false; + //this.modalCtrl.dismiss(succ); + this.modalCtrl.dismiss({ + 'dismissed': true, + data: "Success" + }); + if (this.selEmp && this.isAnswer == false) + this.setFavorite(); + }, 5000); + + this.cs.openNotificationPage(); + } } // not valid it @@ -358,33 +382,97 @@ export class WorkListReplacementRollComponent implements OnInit { } } - public col(){ + public col() { alert("test"); } closeModal() { this.modalCtrl.dismiss(); } - onChangeSelect(select){ + onChangeSelect(select) { console.log(select.detail.value); - let selectValue= select.detail.value; + let selectValue = select.detail.value; + + if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + this.isSelect = true; + } + else { + this.isSelect = false; + + } + } + + onChangeInput() { + clearTimeout(this.typingTimer); + this.typingTimer = setTimeout(() => { + if (this.inputSearch.length > 2) { + this.getreplacmentemployee(); + } + }, 3000); - if(selectValue == "1" || selectValue == "2" ||selectValue == "3"){ - this.isSelect=true; - } - else{ - this.isSelect=false; - } + // if (this.inputSearch.length > 0) { + // this.searchKeyEnter = true; + // this.getreplacmentemployee(); + // } else { + // this.searchKeyEnter = false; + + // } + } + getPlaceHolder() { + return this.searchBy == '1' ? this.ts.trPK('replacementRoll', 'searchbyname') : this.searchBy == '2' ? this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyemail'); + } + getFavruite() { + this.cs.startLoading(); + this.worklistService.getFavorite({}, () => { + + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + this.cs.stopLoading(); + this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + } + }) + } + saveUserFavruiteList(request) { + this.worklistService.saveFavoriteList(request, () => { + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + console.log(result); + + } + }) } - onChangeInput(){ - if (this.inputSearch.length >0) { - this.searchKeyEnter=true; - - }else{ - this.searchKeyEnter=false; - - } + setFavorite() { + var confirmBoxhtml = `
+

Do you want to add ` + this.selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

+
+
+
`; + if (this.selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += ''; + if (!this.selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += ''; + + confirmBoxhtml += ` + + ` + this.selEmp.EMPLOYEE_DISPLAY_NAME + ` + + + +
+
` + let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == this.selEmp.USER_NAME) + if (userIndex == -1) + this.cs.presentConfirmDialog( + confirmBoxhtml + , () => { + var request = + [{ "USER_NAME": this.selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": this.selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": this.selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": this.selEmp.EMPLOYEE_IMAGE, "IsFavorite": true }]; + + this.saveUserFavruiteList(request); + }, () => { + + }) } } diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index d13459cc..0bd57d49 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -288,16 +288,16 @@
-
-
+
- - + + {{actionHistory.NAME}} @@ -331,6 +331,11 @@ class="dateActionHistory"> {{actionHistory.NOTIFICATION_DATE| dateString }} + + + + +
diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss index 7d218c79..f680a4ab 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss @@ -95,9 +95,14 @@ } .dateActionHistory{ - text-align: end; - // margin-top: -25px; - margin-top: -3px; + display: inline-block; + margin-left: 5px; + } + .req_info{ + width: 25px; + height: 25px; + display: inline-block; + margin: 5px; } @@ -329,4 +334,10 @@ ion-card{ .action-btn { white-space: pre-wrap; font-size: 12px; +} +.name{ + color:black !important ;font-weight: bold; +} +.timeline-item{ + margin: 0; } \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 5e732aab..8cb36dd6 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -117,7 +117,7 @@ export class WorklistMainComponent implements OnInit { private modalCtrl: ModalController, public dashboredService: DashboredService, public authService: AuthenticationService - ) { + ) { this.direction = TranslatorService.getCurrentLanguageName() this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj.P_PAGE_NUM = 1; @@ -142,22 +142,18 @@ export class WorklistMainComponent implements OnInit { public segmentChanged(event: any) { this.activeSegment = event.detail.value; - if(this.activeSegment === 'info') - { - this.slides.slideTo(0); - } - else if(this.activeSegment === 'item-req' ) - { - this.slides.slideTo(1); - } - else if(this.activeSegment === 'action-history') - { - this.slides.slideTo(2); - } - else if(this.activeSegment === 'attach') - { - this.slides.slideTo(3); - } + if (this.activeSegment === 'info') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'item-req') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(3); + } console.log(" event.detail.value: " + event.detail.value); } @@ -165,20 +161,16 @@ export class WorklistMainComponent implements OnInit { this.slides.getActiveIndex().then(index => { console.log(index); console.log(event); - if(index === 0) - { + if (index === 0) { this.activeSegment = 'info'; } - else if(index === 1) - { + else if (index === 1) { this.activeSegment = 'item-req'; } - else if(index === 2) - { + else if (index === 2) { this.activeSegment = 'action-history'; } - else if(index === 3) - { + else if (index === 3) { this.activeSegment = 'attach'; } console.log(this.activeSegment); @@ -832,6 +824,7 @@ export class WorklistMainComponent implements OnInit { actionHis[i].visible = false; } this.actionHistoryRes = actionHis; + console.log("test"); } @@ -917,11 +910,12 @@ export class WorklistMainComponent implements OnInit { }// End handleWorkListButtonsResult async openRepRolModal() { + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, backdropDismiss: false, }); - modal.cssClass = 'replaceRoll-modal'; + modal.cssClass = 'replaceRoll-modal2'; modal.onDidDismiss() .then((data) => { console.log(data.data); @@ -1009,4 +1003,8 @@ export class WorklistMainComponent implements OnInit { } }); } + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } } diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html new file mode 100644 index 00000000..c3fe6413 --- /dev/null +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -0,0 +1,144 @@ + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+
+
+ + +
+ + + + + + + + + + + +

Browse Category

+
+ + + +
+
+ +
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Mobile & Tablets

+
+
+
+
+ + + + + + + + Card Title + + + + Keep close to Nature's heart... and break + + 15% Off + Free Delivery + + + + Offer Valid + + + + + + + + + + + + + + + Card Title + + + + Keep close to Nature's heart... and break + + 15% Off + Free Delivery + + + + Offer Valid + + + + + + + + + + + +
+ + +
+ \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/home/home.component.scss b/Mohem/src/app/offersdiscount/home/home.component.scss new file mode 100644 index 00000000..3480c521 --- /dev/null +++ b/Mohem/src/app/offersdiscount/home/home.component.scss @@ -0,0 +1,119 @@ + +.header{ + + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 100%; + width: 100%; + position: absolute; + background: #F5F5F5; + +} + +.SearchtextBox{ + margin: 10px; + border-radius: 20px; +} +.filterText{ + margin: 5px 15px 15px; + font-size: 18px; + font-weight: bold; +} +.container-icon{ + padding: 0 10px 20px; + position: relative; + white-space:nowrap; + overflow-x:auto; +} + +.box-icon{ + width:90px; + height: 90px; + margin: 0px; + display: inline-block; +} +.sale-icon{ + box-shadow: 1px 1px 5px 1px #cccc; + padding: 5px; + margin: 5px; + border-radius: 10px; + background: #fff; +} +.sale-icon ion-icon{ + font-size: 25px; +} +.sale-icon p{ + margin-top:5px; + margin-bottom: 5px; +} +.bottom-icon{ + text-overflow: clip; + white-space: normal; + font-size: 14px; +} +ion-card{ + margin:5px; +} +ion-card-header{ + background: #fff; +} + +ion-card-header img{ + margin:15px auto; +} +.dark{ + display: block; + margin: 6px; + font-size: 18px; +} +ion-card-title{ + + font-weight: bold; + font-size: 18px; + padding: 5px; +} +.orange{ + color: orange; +} +.green{ + color:#00AE4D; +} +ion-segment-button ion-label{ + padding: 0; + font-size: 12px; +} +.segment-button-checked ion-label{ +color: #fff !important; +} +.segment-button-checked{ + background: rgb(46, 46, 46); +} +ion-item{ + --background: #fff; + margin: 10px; + border-radius: 25px; + padding: 5px; +} +ion-item h3{ + color: #000; + font-weight: bold; + font-size: 16px; +} +.yellow{ + color:#ffc107; +} + +ion-item .icon{ +margin: 5px; +} +.edit{ + margin-left:20px !important; +} \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/home/home.component.spec.ts b/Mohem/src/app/offersdiscount/home/home.component.spec.ts new file mode 100644 index 00000000..5ec1377b --- /dev/null +++ b/Mohem/src/app/offersdiscount/home/home.component.spec.ts @@ -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; + + 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(); + }); +}); diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts new file mode 100644 index 00000000..55f0da6e --- /dev/null +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -0,0 +1,19 @@ +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'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'], +}) +export class HomeComponent implements OnInit { + segment: any = '1'; + constructor(public ts: TranslatorService, public cs: CommonService,) { } + ngOnInit() { } + + + openDetails() { + this.cs.navigateForward('/offersdiscount/offer-details'); + } +} diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html new file mode 100644 index 00000000..6e684c6d --- /dev/null +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html @@ -0,0 +1,38 @@ + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+
+
+
+ + + + + Furniture Table + + + + 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. +
+

Offer Valid

+

15% oFF + FREE HOME DELIVERY

+
+ + + + +
+ + +
+
+ + +
\ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss new file mode 100644 index 00000000..3e701f6c --- /dev/null +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.scss @@ -0,0 +1,37 @@ +.header{ + height: 150px; + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 88%; + width: 100%; + position: absolute; + background: #F5F5F5; + top: 20%; +} +ion-card-header{ + background-color: #fff; + padding: 15px !important; +} +.content-bottom{ + padding: 15px; +} +.green{ + color:green; + font-weight: bold; +} +.content-bottom h1{ + font-size: 20px; + margin-top: 10px; + font-weight: bold; +} +.details-button ion-button{ + --background: #565656; +} \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.spec.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.spec.ts new file mode 100644 index 00000000..7f2aaf24 --- /dev/null +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { OfferDetailsComponent } from './offer-details.component'; + +describe('OfferDetailsComponent', () => { + let component: OfferDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ OfferDetailsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(OfferDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts new file mode 100644 index 00000000..9cc9702e --- /dev/null +++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts @@ -0,0 +1,16 @@ +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'; + +@Component({ + selector: 'app-offer-details', + templateUrl: './offer-details.component.html', + styleUrls: ['./offer-details.component.scss'], +}) +export class OfferDetailsComponent implements OnInit { + + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + +} diff --git a/Mohem/src/app/offersdiscount/offersdiscount.module.ts b/Mohem/src/app/offersdiscount/offersdiscount.module.ts new file mode 100644 index 00000000..4c53786e --- /dev/null +++ b/Mohem/src/app/offersdiscount/offersdiscount.module.ts @@ -0,0 +1,41 @@ +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 { OffersdiscountPage } from './offersdiscount.page'; +import { HomeComponent } from './home/home.component'; +import { OfferDetailsComponent } from './offer-details/offer-details.component'; + + +const routes: Routes = [ + { + path: '', + component: OffersdiscountPage, + children: [ + { + path: 'home', + component: HomeComponent + }, + { + path: 'offer-details', + component: OfferDetailsComponent + }, + ], + } +]; + + + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + RouterModule.forChild(routes) + ], + declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent] +}) +export class OffersdiscountPageModule { } diff --git a/Mohem/src/app/offersdiscount/offersdiscount.page.html b/Mohem/src/app/offersdiscount/offersdiscount.page.html new file mode 100644 index 00000000..67cbe279 --- /dev/null +++ b/Mohem/src/app/offersdiscount/offersdiscount.page.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Mohem/src/app/offersdiscount/offersdiscount.page.scss b/Mohem/src/app/offersdiscount/offersdiscount.page.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/offersdiscount/offersdiscount.page.spec.ts b/Mohem/src/app/offersdiscount/offersdiscount.page.spec.ts new file mode 100644 index 00000000..9ca9eb70 --- /dev/null +++ b/Mohem/src/app/offersdiscount/offersdiscount.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { OffersdiscountPage } from './offersdiscount.page'; + +describe('OffersdiscountPage', () => { + let component: OffersdiscountPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ OffersdiscountPage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(OffersdiscountPage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/offersdiscount/offersdiscount.page.ts b/Mohem/src/app/offersdiscount/offersdiscount.page.ts new file mode 100644 index 00000000..07cd6e41 --- /dev/null +++ b/Mohem/src/app/offersdiscount/offersdiscount.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-offersdiscount', + templateUrl: './offersdiscount.page.html', + styleUrls: ['./offersdiscount.page.scss'], +}) +export class OffersdiscountPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/Mohem/src/assets/imgs/close.svg b/Mohem/src/assets/imgs/close.svg new file mode 100644 index 00000000..631fcfaa --- /dev/null +++ b/Mohem/src/assets/imgs/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/delegate.svg b/Mohem/src/assets/imgs/delegate.svg new file mode 100644 index 00000000..18d6ba94 --- /dev/null +++ b/Mohem/src/assets/imgs/delegate.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/fav filled.svg b/Mohem/src/assets/imgs/fav filled.svg new file mode 100644 index 00000000..7987c91b --- /dev/null +++ b/Mohem/src/assets/imgs/fav filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/fav.svg b/Mohem/src/assets/imgs/fav.svg new file mode 100644 index 00000000..cbad1863 --- /dev/null +++ b/Mohem/src/assets/imgs/fav.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/add.svg b/Mohem/src/assets/imgs/itemsforsale/add.svg new file mode 100644 index 00000000..85fea720 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/add.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/animal pers.svg b/Mohem/src/assets/imgs/itemsforsale/animal pers.svg new file mode 100644 index 00000000..ff55246d --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/animal pers.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/arrow.svg b/Mohem/src/assets/imgs/itemsforsale/arrow.svg new file mode 100644 index 00000000..f8ce0eba --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/book and sports.svg b/Mohem/src/assets/imgs/itemsforsale/book and sports.svg new file mode 100644 index 00000000..4d9fc733 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/book and sports.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/call.svg b/Mohem/src/assets/imgs/itemsforsale/call.svg new file mode 100644 index 00000000..0daf5db0 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/call.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/cars.svg b/Mohem/src/assets/imgs/itemsforsale/cars.svg new file mode 100644 index 00000000..b3cc0eeb --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/cars.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/delete.svg b/Mohem/src/assets/imgs/itemsforsale/delete.svg new file mode 100644 index 00000000..55cfa715 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/delete.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/edit.svg b/Mohem/src/assets/imgs/itemsforsale/edit.svg new file mode 100644 index 00000000..da982cc2 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/edit.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/electronic appliances.svg b/Mohem/src/assets/imgs/itemsforsale/electronic appliances.svg new file mode 100644 index 00000000..813d504e --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/electronic appliances.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/fashion .svg b/Mohem/src/assets/imgs/itemsforsale/fashion .svg new file mode 100644 index 00000000..8cf9feb8 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/fashion .svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/filter.svg b/Mohem/src/assets/imgs/itemsforsale/filter.svg new file mode 100644 index 00000000..b4c4a6dc --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/filter.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/furniture.svg b/Mohem/src/assets/imgs/itemsforsale/furniture.svg new file mode 100644 index 00000000..d732f427 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/furniture.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/kid toys.svg b/Mohem/src/assets/imgs/itemsforsale/kid toys.svg new file mode 100644 index 00000000..b9893fdd --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/kid toys.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/mobile.svg b/Mohem/src/assets/imgs/itemsforsale/mobile.svg new file mode 100644 index 00000000..33fbbee5 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/mobile.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/other.svg b/Mohem/src/assets/imgs/itemsforsale/other.svg new file mode 100644 index 00000000..cafb9fe5 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/other.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/sms.svg b/Mohem/src/assets/imgs/itemsforsale/sms.svg new file mode 100644 index 00000000..3a18040d --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/sms.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/banks.svg b/Mohem/src/assets/imgs/offers n discounts/banks.svg new file mode 100644 index 00000000..be89596c --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/banks.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/car care.svg b/Mohem/src/assets/imgs/offers n discounts/car care.svg new file mode 100644 index 00000000..b3cc0eeb --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/car care.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/cloths.svg b/Mohem/src/assets/imgs/offers n discounts/cloths.svg new file mode 100644 index 00000000..8cf9feb8 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/cloths.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/electronic.svg b/Mohem/src/assets/imgs/offers n discounts/electronic.svg new file mode 100644 index 00000000..813d504e --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/electronic.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/fitness.svg b/Mohem/src/assets/imgs/offers n discounts/fitness.svg new file mode 100644 index 00000000..4d9fc733 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/fitness.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/location.svg b/Mohem/src/assets/imgs/offers n discounts/location.svg new file mode 100644 index 00000000..0d208c81 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/location.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/property.svg b/Mohem/src/assets/imgs/offers n discounts/property.svg new file mode 100644 index 00000000..ef9cd1e5 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/property.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/shipping.svg b/Mohem/src/assets/imgs/offers n discounts/shipping.svg new file mode 100644 index 00000000..86769728 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/shipping.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/shopping.svg b/Mohem/src/assets/imgs/offers n discounts/shopping.svg new file mode 100644 index 00000000..c177048a --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/shopping.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/tourism.svg b/Mohem/src/assets/imgs/offers n discounts/tourism.svg new file mode 100644 index 00000000..b8c6f7e0 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/tourism.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Mohem/src/assets/imgs/req info.svg b/Mohem/src/assets/imgs/req info.svg new file mode 100644 index 00000000..5bf4b298 --- /dev/null +++ b/Mohem/src/assets/imgs/req info.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 4ec28a25..a0a8ce2b 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -161,9 +161,9 @@ "en": "Verify its you", "ar": "Verify its you" }, - "check-user-place-holder":{ - "en":"Employee ID", - "ar":"رقم الموظف " + "check-user-place-holder": { + "en": "Employee ID", + "ar": "رقم الموظف " }, "check-user-text1": { "en": "Please Enter your Employee ID, A ", @@ -213,9 +213,9 @@ "en": "Allow the Mohemm app to access your location for marking your attendance", "ar": "اسمح لتطبيق مهم بالوصول إلى موقعك لتحديد حضورك" }, - "not-now":{ - "en":"not now", - "ar":"لاحقاً" + "not-now": { + "en": "not now", + "ar": "لاحقاً" }, "birth_date": { "en": "Birth Date", @@ -234,10 +234,9 @@ "ar": " انتهت مهلة الاتصال بسبب خطأ في الشبكة أو الخوادم قد تكون مشغولة!" }, "error-itg": { - "en": "Dear, this service is not available now, please try again later", + "en": "Dear, this service is not available now, please try again later", "ar": " هذه الخدمة غير متاحة الآن ، يرجى المحاولة مرة أخرى في وقت لاحق" }, - "details": { "en": "Details", "ar": "التفاصيل" @@ -458,7 +457,6 @@ "en": "Optional", "ar": "خياري" }, - "advanced-search": { "en": "Advanced Search", "ar": "بحث متقدم" @@ -876,8 +874,8 @@ "ar": "هل أنت متأكد من حذف هذا الملف نهائيًا؟" }, "option-attendance": { - "en":"Attendance Options", - "ar":"خيارات تسجيل الحضور" + "en": "Attendance Options", + "ar": "خيارات تسجيل الحضور" }, "select-attendance": { "en": "Select Method to Mark your Attendance", @@ -939,13 +937,13 @@ "en": "Your attendance is marked successfully.", "ar": "تم تسجيل حضورك بنجاح" }, - "digital-id":{ - "en":"Employee Digital ID", - "ar":"هوية الموظف الرقمية" + "digital-id": { + "en": "Employee Digital ID", + "ar": "هوية الموظف الرقمية" }, - "appreciate-service":{ - "en":"We appreciate you for completing the service of", - "ar":"نحن نقدر لك استكمال خدمة" + "appreciate-service": { + "en": "We appreciate you for completing the service of", + "ar": "نحن نقدر لك استكمال خدمة" } }, "home": { @@ -977,9 +975,9 @@ "en": "Penading Request", "ar": "طلبات قيد الانتظار" }, - "missing-swipes":{ - "en":"Missing Swipes", - "ar":"فقدان البصمة" + "missing-swipes": { + "en": "Missing Swipes", + "ar": "فقدان البصمة" }, "leave-balance": { "en": "Leave Balance", @@ -1946,6 +1944,30 @@ "msgRFC": { "en": "Select a person", "ar": "اختيار شخص" + }, + "searchbyusername": { + "en": "Search by username", + "ar": "البحث باسم المستخدم" + }, + "searchbyname": { + "en": "Search by name", + "ar": "البحث عن طريق الإسم" + }, + "searchbyemail": { + "en": "Search by email", + "ar": "البحث عن طريق البريد الإلكتروني" + }, + "search-result": { + "en": "Search Results", + "ar": "نتائج البحث" + }, + "related": { + "en": "Related", + "ar": "متعلق ب" + }, + "favorite": { + "en": "Favorite", + "ar": "مفضل" } }, "worklist": { @@ -2059,6 +2081,10 @@ "en": "Request info", "ar": "طلب معلومات" }, + "delegate": { + "en": "Delegate", + "ar": "مندوب" + }, "title": { "en": "Details", "ar": "التفاصيل" @@ -2451,25 +2477,25 @@ "en": "AMU (Last 3 months)", "ar": "AMU (Last 3 months)" }, - "Tran_Succ":{ + "Tran_Succ": { "en": "Transaction Successful", - "ar":"عملية ناجحة" + "ar": "عملية ناجحة" }, - "req_detail":{ + "req_detail": { "en": "ٌRequest Details", - "ar":"تفاصيل الطلب" + "ar": "تفاصيل الطلب" }, - "job_cate":{ + "job_cate": { "en": "Job category", - "ar":"الفئة الوظيفية" + "ar": "الفئة الوظيفية" }, - "category":{ + "category": { "en": "Category", - "ar":"نوع العقد" + "ar": "نوع العقد" }, - "job-name":{ + "job-name": { "en": "Job Title", - "ar":"المسمى الوظيفي" + "ar": "المسمى الوظيفي" }, "emp-email": { "en": "Employee Email Address", @@ -2494,7 +2520,7 @@ "details-emp": { "en": "Details", "ar": "تفاصيل الموظف" - } + } }, "payslip": { "title": { @@ -2567,7 +2593,7 @@ }, "earnings": { "en": "Earnings", - "ar":"مستحقات " + "ar": "مستحقات " }, "deductions": { "en": "Deductions", @@ -2602,6 +2628,12 @@ "ar": "المجموع " } }, + "itemforsale": { + "title": { + "en": "Item for sale", + "ar": "سلعه للبيع" + } + }, "attendance-tracking": { "title": { "en": "Mark Attendance", @@ -2615,23 +2647,23 @@ "en": "Check Out", "ar": "وقت الخروج" }, - "actual-check-in":{ + "actual-check-in": { "en": "Actual Check In", - "ar":"وقت الدخول" + "ar": "وقت الدخول" }, - "actual-check-out":{ + "actual-check-out": { "en": "Actual Check Out", - "ar":"وقت الخروج" + "ar": "وقت الخروج" }, - "approved-check-in":{ + "approved-check-in": { "en": "Approved Check In", - "ar":"اعتماد وقت الدخول" + "ar": "اعتماد وقت الدخول" }, - "approved-check-out":{ + "approved-check-out": { "en": "Approved Check Out", - "ar":"اعتماد وقت الخروج" + "ar": "اعتماد وقت الخروج" }, - "regular":{ + "regular": { "en": "Regular", "ar": "المنتظم" }, @@ -2691,12 +2723,11 @@ "en": "Shift Time", "ar": "وقت التناوب" }, - "shift-type":{ - "en":"Shift Type", - "ar":"نوع المناوبة" + "shift-type": { + "en": "Shift Type", + "ar": "نوع المناوبة" } }, - "sms": { "title": { "en": "SMS", diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index ff3befe8..3c3a5deb 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1313,6 +1313,14 @@ border:0px --width: 100% !important; --border-radius: 0.4cm; +} +.replaceRoll-modal2 { + + padding: 5% 1% !important; + --height: 100% !important; + --width: 100% !important; + --border-radius: 0.4cm; + } .header-md:after { height: 0px !important; @@ -1552,4 +1560,15 @@ table.monthview-datetable th small { top: 3%; position: absolute; display: block; - } \ No newline at end of file + } + .fav-employee-details{ + font-size: 24px; + position: relative; + bottom: 30px; + font-weight: bold; + color: black !important; + } + .fav-profileImageDiv{ + width: 100%; + text-align: start; +} \ No newline at end of file diff --git a/Mohem/tsconfig.json b/Mohem/tsconfig.json index 04015caa..78575c42 100644 --- a/Mohem/tsconfig.json +++ b/Mohem/tsconfig.json @@ -6,7 +6,7 @@ "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, - "module": "es2015", + "module": "commonjs", "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, @@ -24,5 +24,4 @@ "fullTemplateTypeCheck": true, "strictInjectionParameters": true } -} - +} \ No newline at end of file From 821f1ea69635c381a678cacd13dfa39db2a8a3d6 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Sun, 23 May 2021 09:43:11 +0300 Subject: [PATCH 2/6] worklist changes --- .../work-list-replacement-itg.component.html | 84 +++++++++- .../work-list-replacement-itg.component.scss | 60 ++++++++ .../work-list-replacement-itg.component.ts | 48 +++++- .../work-list-replacement-roll.component.html | 4 +- .../work-list-replacement-roll.component.scss | 3 + .../worklist-main-mr.component.html | 144 ++++++++---------- .../worklist-main-mr.component.scss | 121 ++------------- .../worklist-main-mr.component.ts | 137 ++++++++--------- .../worklist-main-po.component.html | 77 +++++++++- .../worklist-main-po.component.scss | 126 ++------------- .../worklist-main-po.component.ts | 17 ++- .../worklist-main-pr.component.html | 65 +++++--- .../worklist-main-pr.component.scss | 123 ++------------- .../worklist-main-pr.component.ts | 106 ++++++------- 14 files changed, 541 insertions(+), 574 deletions(-) diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html index 70329cb2..5df1b8b5 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html @@ -13,7 +13,7 @@
- + + + + + + {{'replacementRoll, searchBy' | translate}} + + + + + + {{'addAttach, name' | translate}} + + + + {{'login, username' | translate}} + + + + {{'general, email' | translate}} + + + + + + + + + + + + + + + + + + - + + +
+ {{'replacementRoll, search-result' | translate}} +
+
+ + + + +
+
+
+ + + + + + + {{employee.EMPLOYEE_DISPLAY_NAME}} + + +
+ +
+
+ + +
+ + + +
+ + +
+ + +
diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss index e69de29b..a7c50320 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss @@ -0,0 +1,60 @@ + +.disabledButton{ + opacity:.5; + + } + + .radio-label{ + margin: 4px; + position: relative; + bottom: 4px; + } + ion-radio{ + --color-checked: #269db8; + } + .center{text-align: center;} + .boldTxtNav{ + font-weight: bold; + } + .employee-details{ + display:inline-block; + margin: 10px; + } + .empImgeRep{ + display: inline-block; + height: 40px; + width: 40px; + } + .star-fav{ + float: right; + margin: 15px; + } + .uk-margin{margin: 15px 0px 0px 15px; + font-weight: bold; + clear: both; + position: relative; + top: 10px;} + .uk-padding{ padding: 20px;} + .uk-padding .employee-details{ + bottom: 10px; + position: relative;} + + .filterInput{ + border: solid var(--gray) 1px; + border-radius: 21px; + padding-left: 10px !important; + } + .filterInput-ar{ + + border: solid var(--gray) 1px; + border-radius: 21px; + --padding-start: 10px !important; + + } + .square-container{ + width:100%; + clear: both; + } + .square{ + clear: both; + } \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts index da811721..141895f3 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts @@ -22,17 +22,18 @@ export class WorkListReplacementItgComponent implements OnInit { selEmp: string = null; callback: any; searchKey: any = ""; - searchKeySelect: string = ""; + searchKeySelect: string = "1"; replacmentRequest: any = ""; isAbs: boolean = false; isSave: boolean = false; - - constructor(public vacationRuleService: VacationRuleServiceService, - public ts: TranslatorService, - public cs: CommonService, + isSelect: boolean = false; + typingTimer: any; + constructor(public vacationRuleService: VacationRuleServiceService, + public ts: TranslatorService, + public cs: CommonService, public modalController: ModalController) { } - ngOnInit() {} + ngOnInit() { } SearchReplacementList() { this.ReplacementList = []; @@ -114,7 +115,7 @@ export class WorkListReplacementItgComponent implements OnInit { let data: any = null; if (this.isSave == true) { if (this.selEmp) { - data = this.ReplacementList[this.selEmp]; + data = this.selEmp; } else { data = null; } @@ -128,4 +129,37 @@ export class WorkListReplacementItgComponent implements OnInit { }); } } + + onChangeSelect(select) { + console.log(select.detail.value); + let selectValue = select.detail.value; + + if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + this.isSelect = true; + } + else { + this.isSelect = false; + + } + } + getPlaceHolder() { + return this.searchKeySelect == '1' ? this.ts.trPK('replacementRoll', 'searchbyname') : this.searchKeySelect == '2' ? this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyemail'); + } + onChangeInput() { + this.ReplacementList = []; + clearTimeout(this.typingTimer); + this.typingTimer = setTimeout(() => { + if (this.searchKey.length > 2) { + this.SearchReplacementList(); + } + }, 3000); + } + select(selectEmp, index) { + console.log(selectEmp.EMPLOYEE_DISPLAY_NAME); + this.selEmp = selectEmp + // this.active = index; + // this.userSelected = true; + this.searchKey = selectEmp.EMPLOYEE_DISPLAY_NAME ? selectEmp.EMPLOYEE_DISPLAY_NAME : selectEmp.NAME; + this.closePage(); + } } diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index f75d34cf..7536c23e 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -59,7 +59,7 @@
-
+
{{'replacementRoll, related' | translate}}
@@ -84,7 +84,7 @@

-
+
{{'replacementRoll, favorite' | translate}}
diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss index 2ff64c1b..ac775fbf 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss @@ -167,6 +167,9 @@ ion-radio{ .employee-details{ display:inline-block; margin: 10px; + text-overflow: ellipsis; + white-space: nowrap; + width: 70%; } .empImgeRep{ display: inline-block; diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 56e1f721..09dd07e9 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -437,89 +437,79 @@ - - - -
-

{{ 'general, empty' | translate}}

-
-
- -
- - -
- - - -
- - -
-
- - {{actionHistory.NAME}} - - -
-
-
- Note: {{actionHistory.NOTE}} -
-
- - -
- -
- Note: {{actionHistory.NOTE}} - - -
- + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{actionHistory.NOTIFICATION_DATE| dateString }} +
+ + + + + +
+
-
- - - - - {{actionHistory.ACTION}} - - - - {{actionHistory.NOTIFICATION_DATE| dateString }} - - +
- -
- + - + - - - + + diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss index b539fa22..61bff403 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss @@ -1,110 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 15px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } - .no-padding-label { padding: 0px !important; } @@ -139,4 +32,18 @@ .action-btn { white-space: nowrap; font-size: 10px; + } + .req_info{ + width: 25px; + height: 25px; + display: inline-block; + margin: 5px; + } + .name{ + color:black !important ;font-weight: bold; + } + .timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; } \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 180ef69d..139caa14 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -112,9 +112,9 @@ export class WorklistMainMRComponent implements OnInit { public isPostNoLoad = true; public worklistNotifications: any; public totalRequestCount = 0; - approve_label: any =""; - reject_label: any=""; - reqInfo_label: any=""; + approve_label: any = ""; + reject_label: any = ""; + reqInfo_label: any = ""; close_label: any; closeDis: boolean = false; selectedFilter: string; @@ -142,47 +142,39 @@ export class WorklistMainMRComponent implements OnInit { ngOnInit() { this.WorkListAttachObj = new WorkListButtonRequest(); - this.selectedFilter = this.common.sharedService.getSharedData('selectedFilter', false); + this.selectedFilter = this.common.sharedService.getSharedData('selectedFilter', false); this.intializeNotificationDetail(); } public segmentChanged(event: any) { this.activeSegment = event.detail.value; - if(this.activeSegment === 'info') - { - this.slides.slideTo(0); - } - else if(this.activeSegment === 'item-req') - { - this.slides.slideTo(1); - } - else if(this.activeSegment === 'action-history') - { - this.slides.slideTo(2); - } - else if(this.activeSegment === 'attach') - { - this.slides.slideTo(3); - } + if (this.activeSegment === 'info') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'item-req') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(3); + } } public slideChanged(event: any) { this.slides.getActiveIndex().then(index => { - if(index === 0) - { + if (index === 0) { this.activeSegment = 'info'; } - else if(index === 1) - { + else if (index === 1) { this.activeSegment = 'item-req'; } - else if(index === 2) - { + else if (index === 2) { this.activeSegment = 'action-history'; } - else if(index === 3) - { + else if (index === 3) { this.activeSegment = 'attach'; } }); @@ -316,7 +308,7 @@ export class WorklistMainMRComponent implements OnInit { getNotificationButtons(notificationButtonsObj) { - this.notificationButtonRes=[]; + this.notificationButtonRes = []; this.worklistMainService .getNotificationButtons(notificationButtonsObj) .subscribe((result: NotificatonButtonResponse) => { @@ -332,31 +324,30 @@ export class WorklistMainMRComponent implements OnInit { this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore'); // console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED" ) { - this.approve_label=this.notificationButtonRes[i].BUTTON_LABEL; - + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { + this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED" ) { - this.reject_label=this.notificationButtonRes[i].BUTTON_LABEL; + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { + this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; this.rejectDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { - this.reqInfo_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; this.requestDis = true; } // if result == null else if // if result == null - (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { - this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; - this.closeDis = true; - } - else if( - this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") - { - this.moreDisabled = false; + (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { + this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.closeDis = true; + } + else if ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { + this.moreDisabled = false; - } + } } // valid it @@ -413,10 +404,10 @@ export class WorklistMainMRComponent implements OnInit { public nextNotfification() { //let itemExist = false; - if( document.getElementById("notificationDynamicFieldsMR") != null){ + if (document.getElementById("notificationDynamicFieldsMR") != null) { document.getElementById("notificationDynamicFieldsMR").innerHTML = ""; - } + } let itemNo = this.getPassNotificationDetails.ROW_NUM; let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); let previousRequest = this.notificationArray[index].REQUEST_TYPE; @@ -438,23 +429,23 @@ export class WorklistMainMRComponent implements OnInit { } } - checkRequestType(index){ - if (this.notificationArray[index].REQUEST_TYPE === 'PO' ) { + checkRequestType(index) { + if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); } else - if (this.notificationArray[index].REQUEST_TYPE === 'PR' ) { - this.common.openWorklistMainPRPage(); - } else - if (this.notificationArray[index].REQUEST_TYPE === 'MO' ) { - this.intializeNotificationDetail(); - } else { - this.common.openWorklistMainPage(); - } + if (this.notificationArray[index].REQUEST_TYPE === 'PR') { + this.common.openWorklistMainPRPage(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'MO') { + this.intializeNotificationDetail(); + } else { + this.common.openWorklistMainPage(); + } } actionButton(action) { // console.log('actionButton' + action); - // alert("don't forget"); + // alert("don't forget"); //let ButtonAction: string = this.actionType; let ButtonAction: string = action; var responseAttrDic = this.notExampleJsonObject; @@ -514,7 +505,7 @@ export class WorklistMainMRComponent implements OnInit { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } - // this.openApplyModal(this.WorkListActionObj); + // this.openApplyModal(this.WorkListActionObj); this.common.confirmAlertDialogAction( () => { @@ -682,7 +673,7 @@ export class WorklistMainMRComponent implements OnInit { getNotificationResAttr(notificationButtonsObj) { // console.log("getNotificationResAttr"); - this.NotRespondAttributeList=[]; + this.NotRespondAttributeList = []; this.worklistMainService .notificationResponseAttr(notificationButtonsObj) .subscribe((result: NotificatonButtonResponse) => { @@ -779,7 +770,7 @@ export class WorklistMainMRComponent implements OnInit { getAttachmentNotification(WorkListAttachObj) { - this.attachmentRes=[]; + this.attachmentRes = []; this.worklistAttachService.getAttach(WorkListAttachObj). subscribe((result: NotificationGetAttachResponse) => { this.handleWorkListAttachResult(result); @@ -797,7 +788,7 @@ export class WorklistMainMRComponent implements OnInit { getActionHistory(WorkListActionHistoryObj) { this.IsReachEnd = true; - this.actionHistoryRes=[]; + this.actionHistoryRes = []; this.worklistService.getActionHistory(WorkListActionHistoryObj). subscribe((result: WorkListActionHistoryResponse) => { this.handleWorkListActionHistoryResult(result); @@ -1105,7 +1096,7 @@ export class WorklistMainMRComponent implements OnInit { async openReplacementRoll() { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, backdropDismiss: false, @@ -1118,13 +1109,13 @@ export class WorklistMainMRComponent implements OnInit { if (data.data.data == 'cancel' || data.data.data == undefined) { return; - } else if (data.data.data == 'Success') { + } else if (data.data.data == 'Success') { // this.openNotificationsDashboard(); this.messageSuccess = true; - setTimeout(() => { - this.messageSuccess = false; - this.nextNotfification(); - }, 2000); + setTimeout(() => { + this.messageSuccess = false; + this.nextNotfification(); + }, 2000); // this.nextNotfification(); } @@ -1170,17 +1161,17 @@ export class WorklistMainMRComponent implements OnInit { } - getMOItemHistory(itemID ,orgID) { + getMOItemHistory(itemID, orgID) { // console.log(itemID); this.IsReachEnd = false; const request = new MOItemHistoryReq(); request.P_ITEM_ID = parseInt(itemID); request.P_PAGE_LIMIT = 100; request.P_PAGE_NUM = 1; - request.P_ORG_ID= parseInt(orgID); - + request.P_ORG_ID = parseInt(orgID); + + - this.worklistMainService.getMOItemHistory(request). subscribe((result: MOItemHistoryRes) => { // this.common.sharedService.setSharedData( @@ -1222,6 +1213,10 @@ export class WorklistMainMRComponent implements OnInit { } }); } + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 02711308..d31bd1b1 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -170,6 +170,81 @@ + + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{actionHistory.NOTIFICATION_DATE| dateString }} +
+ + + + + +
+
+
+
+
+ + + +
+
+ +
+
diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss index ffee0278..409f7446 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss @@ -1,112 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 16px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } - -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } - -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } .no-padding-label { padding: 0px !important; @@ -141,4 +32,19 @@ .action-btn { white-space: nowrap; font-size: 10px; - } \ No newline at end of file + } + .name{ + color:black !important ;font-weight: bold; + } + .timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; + } + .req_info{ + width: 25px; + height: 25px; + display: inline-block; + margin: 5px; + } + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index a37979ef..b9c60828 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -129,7 +129,7 @@ export class WorklistMainPoComponent implements OnInit { reqInfo_label: any; closeDis: boolean = false; selectedFilter: string; -; + ; close_label: any; constructor( @@ -449,11 +449,11 @@ export class WorklistMainPoComponent implements OnInit { if (index < this.notificationArray.length) { this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); this.activeSegment = 'line_details'; - if(this.selectedFilter === 'ALL'){ - this.checkRequestType(index); + if (this.selectedFilter === 'ALL') { + this.checkRequestType(index); } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { this.checkRequestType(index); - }else { + } else { this.common.openNotificationPage(); } } else { @@ -462,7 +462,7 @@ export class WorklistMainPoComponent implements OnInit { } - checkRequestType(index){ + checkRequestType(index) { if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.intializeNotificationDetail(); } else @@ -1170,7 +1170,7 @@ export class WorklistMainPoComponent implements OnInit { async openRepRolModal() { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, @@ -1245,5 +1245,8 @@ export class WorklistMainPoComponent implements OnInit { }); } - + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } } diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index b4f6cd3a..ae0d9f95 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -199,44 +199,50 @@ - + + +

{{ 'general, empty' | translate}}

- -
-
+ +
+
-
+ src="../assets/imgs/profile.png">
- - + + {{actionHistory.NAME}} -
-
-
-
- Note: {{actionHistory.NOTE}} -
+ +
+
+
+ Note: {{actionHistory.NOTE}}
-
-
- Note: {{actionHistory.NOTE}} -
- +
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + +
+ +
{{actionHistory.NOTIFICATION_DATE| dateString }} + + + + + +
+ + {{ 'general, load-more' | translate}} + + - - + + diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss index c58a5c9b..76877e22 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss @@ -1,109 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 16px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } .no-padding-label { padding: 0px !important; @@ -139,4 +33,19 @@ // white-space: pre-wrap; white-space: nowrap; font-size: 10px; - } \ No newline at end of file + } + +.name{ + color:black !important ;font-weight: bold; +} +.timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; +} +.req_info{ + width: 25px; + height: 25px; + display: inline-block; + margin: 5px; +} diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index 7fa0f6d3..fbb8ad2d 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -146,22 +146,18 @@ export class WorklistMainPRComponent implements OnInit { public segmentChanged(event: any) { this.activeSegment = event.detail.value; - if(this.activeSegment === 'info') - { - this.slides.slideTo(0); - } - else if(this.activeSegment === 'item-req') - { - this.slides.slideTo(1); - } - else if(this.activeSegment === 'action-history') - { - this.slides.slideTo(2); - } - else if(this.activeSegment === 'attach') - { - this.slides.slideTo(3); - } + if (this.activeSegment === 'info') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'item-req') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(3); + } console.log(" event.detail.value: " + event.detail.value); } @@ -169,20 +165,16 @@ export class WorklistMainPRComponent implements OnInit { this.slides.getActiveIndex().then(index => { console.log(index); console.log(event); - if(index === 0) - { + if (index === 0) { this.activeSegment = 'info'; } - else if(index === 1) - { + else if (index === 1) { this.activeSegment = 'item-req'; } - else if(index === 2) - { + else if (index === 2) { this.activeSegment = 'action-history'; } - else if(index === 3) - { + else if (index === 3) { this.activeSegment = 'attach'; } console.log(this.activeSegment); @@ -194,7 +186,7 @@ export class WorklistMainPRComponent implements OnInit { this.approveDis = false; this.rejectDis = false; this.requestDis = false; - this.closeDis =false; + this.closeDis = false; this.moreDisabled = true; if (this.messageSuccess) { @@ -362,29 +354,28 @@ export class WorklistMainPRComponent implements OnInit { console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') { - this.approve_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; this.approveDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') { - this.reject_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; this.rejectDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { - this.reqInfo_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; this.requestDis = true; } // if result == null else if // if result == null - (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { - this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; - this.closeDis = true; - } + (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { + this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.closeDis = true; + } else if ( - this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") - { - this.moreDisabled = false; + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { + this.moreDisabled = false; - } + } } // valid it } } // valid it @@ -438,11 +429,11 @@ export class WorklistMainPRComponent implements OnInit { public nextNotfification() { //let itemExist = false; - if( document.getElementById("notificationDynamicFieldsPR") != null){ - + if (document.getElementById("notificationDynamicFieldsPR") != null) { + document.getElementById("notificationDynamicFieldsPR").innerHTML = ""; - } + } let itemNo = this.getPassNotificationDetails.ROW_NUM; console.log(itemNo); let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); @@ -454,31 +445,31 @@ export class WorklistMainPRComponent implements OnInit { if (index < this.notificationArray.length) { this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); this.activeSegment = 'info'; - if(this.selectedFilter === 'ALL'){ + if (this.selectedFilter === 'ALL') { this.checkRequestType(index); } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { this.checkRequestType(index); - } else { - this.common.openNotificationPage(); - } + } else { + this.common.openNotificationPage(); + } } else { this.common.openNotificationPage(); } } - checkRequestType(index){ - if (this.notificationArray[index].REQUEST_TYPE === 'PO' ) { + checkRequestType(index) { + if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); } else - if (this.notificationArray[index].REQUEST_TYPE === 'PR' ) { - this.intializeNotificationDetail(); - } else - if (this.notificationArray[index].REQUEST_TYPE === 'MO' ) { - this.common.openWorklistMainMRPage(); - } else { - this.common.openWorklistMainPage(); - } + if (this.notificationArray[index].REQUEST_TYPE === 'PR') { + this.intializeNotificationDetail(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'MO') { + this.common.openWorklistMainMRPage(); + } else { + this.common.openWorklistMainPage(); + } } actionButton(action) { @@ -755,7 +746,7 @@ export class WorklistMainPRComponent implements OnInit { for (let i = 0; i < notificationAttr.length; i++) { if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', ''); - console.log(this.textArea ); + console.log(this.textArea); } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') { @@ -1104,7 +1095,7 @@ export class WorklistMainPRComponent implements OnInit { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, backdropDismiss: false, @@ -1176,5 +1167,8 @@ export class WorklistMainPRComponent implements OnInit { } }); } - + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } } \ No newline at end of file From d07e18b657cbba1f200714b2b0fd50a70df1c2c5 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Sun, 23 May 2021 12:55:36 +0300 Subject: [PATCH 3/6] added new category for Item Creation --- .../app/notification/home/home.component.ts | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index fc4f266c..d0aae37b 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -75,6 +75,8 @@ export class HomeComponent implements OnInit { public totalPO = 0; public totalPR = 0; public totalMR = 0; + public totalIC = 0; + public showChart = false; public isPostNoLoad = true; @@ -86,13 +88,14 @@ export class HomeComponent implements OnInit { public data = { datasets: [ { - data: [0, 0, 0, 0, 0], + data: [0, 0, 0, 0, 0, 0], backgroundColor: [ '#18a169', '#38c9b3', '#114475', '#3cb9d5', - '#cc3232' + '#cc3232', + '#9e7e97' ], borderWidth: 5 }] @@ -145,6 +148,14 @@ export class HomeComponent implements OnInit { color: '#cc3232', key: 'ITG', disable: false + }, + { + value: 0, + name: 'IC', + active: false, + color: '#9e7e97', + key: 'INVITEM', + disable: false } ]; public slideOptsOne = { @@ -226,6 +237,7 @@ export class HomeComponent implements OnInit { this.filters[2].value = this.totalPO; this.filters[3].value = this.totalPR; this.filters[4].value = this.totalMR; + this.filters[5].value = this.totalIC; if (this.totalHR === 0) { this.data.datasets[0].data[0] = 0; @@ -243,6 +255,10 @@ export class HomeComponent implements OnInit { this.data.datasets[0].data[3] = 0; } + if (this.totalIC === 0) { + this.data.datasets[0].data[5] = 0; + } + const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; for (const notification of openNotificationsArray) { @@ -258,6 +274,9 @@ export class HomeComponent implements OnInit { } else if (notification.ITEM_TYPE === 'INVMOA') { this.filters[4].value = this.totalMR; this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; + } else if (notification.ITEM_TYPE === 'INVITEM') { + this.filters[6].value = this.totalIC; + this.data.datasets[0].data[5] = notification.OPEN_NTF_NUMBER; } } // this.data.datasets[0].data[4] = this.ITGCount; @@ -414,6 +433,8 @@ export class HomeComponent implements OnInit { this.totalPR = this.totalPR + 1; } else if (workList.ITEM_TYPE === 'INVMOA') { this.totalMR = this.totalMR + 1; + } else if (workList.ITEM_TYPE === 'INVITEM') { + this.totalIC = this.totalIC + 1; } } @@ -422,6 +443,7 @@ export class HomeComponent implements OnInit { this.totalPO = 0; this.totalPR = 0; this.totalMR = 0; + this.totalIC = 0; const datePipe = new DatePipe('en-US'); const formattedData = []; From 57467ea800eb28b1756602b4eedce6270870bd3c Mon Sep 17 00:00:00 2001 From: enadhilal Date: Sun, 23 May 2021 15:00:10 +0300 Subject: [PATCH 4/6] Item Creation page added --- .../services/common/common.service.ts | 4 +- .../app/notification/home/home.component.ts | 2 + .../app/notification/notification.module.ts | 82 +- .../service/work-list.main.service.ts | 52 +- .../worklist-main-ic.component.html | 558 ++++++++ .../worklist-main-ic.component.scss | 144 ++ .../worklist-main-ic.component.spec.ts | 27 + .../worklist-main-ic.component.ts | 1272 +++++++++++++++++ .../worklist-main-po.component.html | 2 +- 9 files changed, 2079 insertions(+), 64 deletions(-) create mode 100644 Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html create mode 100644 Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss create mode 100644 Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts create mode 100644 Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 8e7fce00..83f50a82 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1178,7 +1178,6 @@ public getMonthNameAr(value: number): string { public openMOItemHistoryPage(){ this.nav.navigateForward(['/notification/item-history-MO']); - } public openQutationAnalysisPage() { this.nav.navigateForward(['/notification/qutation-analysis-PO']); @@ -1186,6 +1185,9 @@ public getMonthNameAr(value: number): string { public openWorklistMainMRPage() { this.nav.navigateForward(['/notification/worklist-main-MR']); } + public openWorklistMainICPage() { + this.nav.navigateForward(['/notification/item-creation-IC']); + } public openWorklistITGPage() { this.nav.navigateForward(['/notification/worklist-main-ITG']); } diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index fc4f266c..a93dcfb6 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -507,6 +507,8 @@ export class HomeComponent implements OnInit { this.common.openWorklistMainPOPage(); } else if (obj.REQUEST_TYPE === 'MO') { this.common.openWorklistMainMRPage(); + } else if (obj.REQUEST_TYPE === 'ITEM_CREATION') { + this.common.openWorklistMainICPage(); } else { this.common.openWorklistMainPage(); } diff --git a/Mohem/src/app/notification/notification.module.ts b/Mohem/src/app/notification/notification.module.ts index e191db27..d9b5da73 100644 --- a/Mohem/src/app/notification/notification.module.ts +++ b/Mohem/src/app/notification/notification.module.ts @@ -28,9 +28,10 @@ import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.com import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component'; import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component'; // import { WorklistMainComponent } from './worklist-main/worklist-main.component'; -import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component' +import { MoreActionModalComponent } from './more-action-modal/more-action-modal.component' import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component'; import { MoItemHistoryComponent } from './mo-item-history/mo-item-history.component'; +import { WorklistMainIcComponent } from './worklist-main-ic/worklist-main-ic.component'; const routes: Routes = [ @@ -50,7 +51,7 @@ const routes: Routes = [ path: 'worklist-main', component: WorklistMainComponent }, - { + { path: 'work-list-replacement-roll', component: WorkListReplacementRollComponent }, @@ -84,40 +85,44 @@ const routes: Routes = [ component: WorklistMainPRComponent }, { - path: 'apply-action-modal', - component: ApplyActionModalComponent - }, - { - path: 'worklist-main-PO', - component: WorklistMainPoComponent - }, - { - path: 'item-history-PO', - component: ItemHistoryComponent - }, - { - path: 'qutation-analysis-PO', - component: QutationAnalysisComponent - }, - { - path: 'worklist-main-MR', - component: WorklistMainMRComponent - }, - { - path: 'worklist-main-ITG', - component: WorkListMainItgComponent - }, - { - path: 'more-action-modal', - component: MoreActionModalComponent - }, - { - path: 'worklist-replacement-itg', - component: WorkListReplacementItgComponent - }, - { - path: 'item-history-MO', - component: MoItemHistoryComponent + path: 'apply-action-modal', + component: ApplyActionModalComponent + }, + { + path: 'worklist-main-PO', + component: WorklistMainPoComponent + }, + { + path: 'item-history-PO', + component: ItemHistoryComponent + }, + { + path: 'qutation-analysis-PO', + component: QutationAnalysisComponent + }, + { + path: 'worklist-main-MR', + component: WorklistMainMRComponent + }, + { + path: 'worklist-main-ITG', + component: WorkListMainItgComponent + }, + { + path: 'more-action-modal', + component: MoreActionModalComponent + }, + { + path: 'worklist-replacement-itg', + component: WorkListReplacementItgComponent + }, + { + path: 'item-history-MO', + component: MoItemHistoryComponent + }, + { + path: 'item-creation-IC', + component: WorklistMainIcComponent } ] } @@ -153,7 +158,8 @@ const routes: Routes = [ WorklistAdvancedSearchComponent, WorkListMainItgComponent, WorkListReplacementItgComponent, - MoItemHistoryComponent + MoItemHistoryComponent, + WorklistMainIcComponent // WorklistMainComponent ], entryComponents: [ @@ -161,4 +167,4 @@ const routes: Routes = [ ], providers: [WorklistService, WorklistMainService, WorklistAttachService] }) -export class NotificationPageModule {} +export class NotificationPageModule { } diff --git a/Mohem/src/app/notification/service/work-list.main.service.ts b/Mohem/src/app/notification/service/work-list.main.service.ts index b4d19488..dec72b70 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -23,33 +23,22 @@ import { itgRequest } from '../models/itgFormDetailsRequest'; @Injectable() export class WorklistMainService { - public static getEITNotificationBody = - "Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY"; - public static getAbsenceNotificationBody = - "Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY"; - public static getPoNotificationBody = - "Services/ERP.svc/REST/GET_PO_NOTIFICATION_BODY"; - public static getMONotificationBody = - "Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY"; - public static getPRNotificationBody = - "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; + public static getEITNotificationBody = "Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY"; + public static getAbsenceNotificationBody = "Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY"; + public static getPoNotificationBody = "Services/ERP.svc/REST/GET_PO_NOTIFICATION_BODY"; + public static getMONotificationBody = "Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY"; + public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; + public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY"; public static getPOItemHistory = "Services/ERP.svc/REST/GET_PO_ITEM_HISTORY"; public static getMOItemHistory = "Services/ERP.svc/REST/GET_MO_ITEM_HISTORY"; - public static getNotificationButtons = - "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS"; + public static getNotificationButtons = "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS"; public static getUserInfo = "Services/ERP.svc/REST/Get_UserInformation"; - public static getNotificationAction = - "Services/ERP.svc/REST/NOTIFICATION_ACTIONS"; - public static getNotificationRespondAtt = - "Services/ERP.svc/REST/NOTIFICATION_GET_RESPOND_ATTRIBUTES"; - public static getQutationAnalysisUrl = - "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS"; - public static getITGFormTaskCount = - 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; - public static getITGFormTaskDetails = - 'Services/COCWS.svc/REST/ITGFormsPendingTasks'; - public static getITGFormDetails = - 'Services/COCWS.svc/REST/ITGGetFormDetials'; + public static getNotificationAction = "Services/ERP.svc/REST/NOTIFICATION_ACTIONS"; + public static getNotificationRespondAtt = "Services/ERP.svc/REST/NOTIFICATION_GET_RESPOND_ATTRIBUTES"; + public static getQutationAnalysisUrl = "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS"; + public static getITGFormTaskCount = 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; + public static getITGFormTaskDetails = 'Services/COCWS.svc/REST/ITGFormsPendingTasks'; + public static getITGFormDetails = 'Services/COCWS.svc/REST/ITGGetFormDetials'; @@ -118,6 +107,21 @@ export class WorklistMainService { ); } + public getICNotificationBody( + WorkListBodyRequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = WorkListBodyRequest; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistMainService.getICNotificationBody, + request, + onError, + errorLabel + ); + } + public getPONotificationBody( WorkListBodyRequest: any, onError?: any, diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html new file mode 100644 index 00000000..6050b9d4 --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html @@ -0,0 +1,558 @@ + + + + +
+
{{getPassNotificationDetails.SUBJECT}}
+ + + + + + {{'worklistMain,itemReq'| translate}} + + + + {{'worklistMain, action' | translate}} + + + + {{'worklistMain, attach-file' | translate}} + + + + + {{'worklistMain, info'| translate}} + + + + + + +
+

{{ 'general, empty' | translate}}

+
+ + +
+ + + +
{{pInformation}}
+
+
+ + + + +
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+ + + + + + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+ +
+ + +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ +
+ {{actionHistory.ACTION}} + + + + {{actionHistory.NOTIFICATION_DATE| + dateString }} + +
+
+
+
+
+ + +
+ +
+
+
+ + + + + +
+

{{ 'general, notAttch' | translate}}

+
+
+ + + + + {{i+1}}. {{attachList.FILE_NAME}} + + + + + + + + +
+
+
+
+
+ + + + + + +
+ + + + + +
+ {{Lines.OPERATING_UNIT}} +
+ + +
+ {{Lines.CATEGORY}} +
+
+ + + +
+ {{Lines.REQUESTER}} +
+ + +
+ {{Lines.ANALYZED_BY}} +
+
+ + + +
+ {{Lines.APPROVED_DATE}} +
+ + +
+ {{Lines.ITEM_TYPE}} +
+
+ + + +
+ {{Lines.RELATED_TO}} +
+ + +
+ {{Lines.REQUEST_DATE| date}} + +
+
+ + + +
+ {{Lines.ANALYZED_DATE| date}} +
+ + +
+ {{Lines.URGENT_FLAG_DISP}} +
+
+ + +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+ + + + +
{{'worklistMain, Tran_Succ' | translate}}
+
+
+
+ + + + + + + + + + + + + {{approve_label}} + + + + + + {{close_label}} + + + + + + {{reject_label}} + + + + + {{reqInfo_label}} + + + + {{'worklistMain, skip' | translate}} + + + + + {{'worklistMain, more' | translate}} + + + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss new file mode 100644 index 00000000..ffee0278 --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss @@ -0,0 +1,144 @@ +// .itemHISBtn{ +// padding: 5px; +// color: var(--light); +// background: var(--darkgray); +// border-radius: 3px; +// width: 85%; +// height: 40px; +// } + + +// .rowBtn{ +// display: flex; +// flex-direction: row; +// justify-content: center; +// align-items: center; +// background: white; +// } + + + +// .rowBorder{ +// border-bottom: solid 0.03cm var(--grayBG); + +// } +// .colBorder{ +// border-right: solid 0.03cm var(--grayBG); + +// } + +// .dateActionHistory{ +// text-align: end; +// // margin-top: -25px; +// } + + +// .actionBtn{ +// --border-radius: 50% !important; +// height: 55px; +// width: 55px; +// --background: var(--newgreen); // will be dynamic +// background: transparent; +// margin:10px; +// } + +// .itemAttch{ +// border-radius: 11px; +// margin: 8px; +// --min-height: 60px; +// --max-height: 60px; +// } + +// .less { +// max-height: 54px; +// } + +// .noDataDiv{ +// background: #ffffff; +// height: 11%; +// text-align: center; +// padding-top: 1px; +// border-radius: 10px; +// margin: 10px; +// } + + +// .container { +// font-size: 14px; +// line-height: 14px; +// height: 16px; +// overflow: hidden; +// text-align: justify; +// } + +// .show { +// overflow: visible; +// height: auto; +// } + +// .showMore{ +// padding: 0px; +// background: transparent; +// color: blue; +// text-decoration: underline; +// font-size: 14px; +// } + +// .succssfullMSG{ +// height: 100%; +// width: 100%; +// background: var(--newgreen); +// color: white; +// font-weight: bold; +// font-size: 20px; +// text-align: center; +// vertical-align: middle; +// padding-top: 30px; +// } + +// .succssfullIcon{ +// width: 60%; +// text-align: center; +// height: 60%; +// } + +// .subjectNotification{ +// text-align: center; +// padding-top: 10px; +// font-weight: bold; +// } + +.no-padding-label { + padding: 0px !important; +} + +.margin-left { + margin-left: 0px; +} + +.active-Segment { + font-size: 0.3cm !important; + background: #269DB8 !important; + text-transform: none; + --color-checked: none; + border-radius: 100px; + border:0; + } + .active-Segment ion-label{ + font-size: 11px; + color: white !important; + } + .normal-Segment ion-label{ + color: black !important; + font-size: 11px; + } + .normal-Segment { + font-size: 0.3cm !important; + text-transform: none; + --color-checked: none; + border: 0; + } + .action-btn { + white-space: nowrap; + font-size: 10px; + } \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts new file mode 100644 index 00000000..5364d18a --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { WorklistMainIcComponent } from './worklist-main-ic.component'; + +describe('WorklistMainIcComponent', () => { + let component: WorklistMainIcComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ WorklistMainIcComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(WorklistMainIcComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts new file mode 100644 index 00000000..0e6f77e5 --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts @@ -0,0 +1,1272 @@ +import { Component, OnInit, ElementRef, ViewChild } 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 { WorkListBodyRequest } from "../models/NotificationBodyReq"; +import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes"; +import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes"; +import { NotificatonButtonResponse } from "../models/NotificationButtonRes"; +import { WorkListActionRequest } from "../models/NotificationActionReq"; +import { WorkListButtonRequest } from "../models/NotificationButtonReq"; +// import { isDate } from 'angular6-json-schema-form'; +import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response"; +import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request"; +import { WorklistMainService } from "../service/work-list.main.service"; +import { HomeComponent } from "src/app/notification/home/home.component"; +import { TextInput } from 'src/app/uI-elements/text.input'; +import { TextAreaInput } from 'src/app/uI-elements/text-area.input'; +import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; +import { Events, ModalController } from '@ionic/angular'; +import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes'; +import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes'; +import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes'; +import { WorklistAttachService } from 'src/app/absence/service/work-list-attach.service'; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { PRNotificatonBodyList } from '../models/PRNotificationBodyList'; +import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq'; +import { WorklistService } from '../service/worklist.service'; +import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.component'; +import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; +import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component'; +import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component'; +import { POItemHistoryRes } from '../models/POItemHistoryRes'; +import { POItemHistoryRequest } from '../models/POItemHistoryReq'; +import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes'; +import { QuotationAnalysisRequest } from '../models/quotationAnalysisReq'; +import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component' +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; +import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; +import { IonSlides } from '@ionic/angular';​ + +@Component({ + selector: 'app-worklist-main-ic', + templateUrl: './worklist-main-ic.component.html', + styleUrls: ['./worklist-main-ic.component.scss'], +}) +export class WorklistMainIcComponent implements OnInit { + @ViewChild('slides') slides: IonSlides; + private WorkListBodyObj: WorkListBodyRequest; + private WorkListButtonsObj: WorkListButtonRequest; + private WorkListActionObj: WorkListActionRequest; + private WorkListActionHistoryObj: WorkListActionHistoryRequest; + private WorkListAttachObj: WorkListButtonRequest; + private PRList: PRNotificatonBodyList; + + public static PASS_NOTIFICATION_INFO = "passNotificationInfo"; + public static PASS_PO_INFO = "passPOInfo"; + public static PASS_PO_HEADER_ID = "passPOHeader"; + public static PASS_ACTION_MODE = "passActionMode"; + public static PASS_ACTION_MORE = "passActioMore"; + public isPostNoLoad = true; + public worklistNotifications: any; + public totalRequestCount = 0; + getPassNotificationDetails: any; + public static PASS_RES_ATTR = "passResAttr"; + TransactionID: number = -999; + notificationBodyRes: any = []; + actionHistoryRes: any = []; + notificationButtonRes: any; + actionMode: any; + pInformation: string = ""; + pQuestion: string = ""; + RespondAttributesListRes: any; + schemaNotific: any; + NotRespondAttributeList: any; + Resp2_val: any; + notExampleJsonObject: any; + hideForwordEmployee: any; + exampleJsonObject: any; + dataOfAttr: any; + P_RESPOND_ATTRIBUTES_TBL: any; + selEmployeeID: any; + actionType: string = ""; + notificationArray: any; + notificationDynamicAttributeArr: any; + private textInput: TextInput; + private textArea: TextAreaInput; + notificationCount: any; + attachmentRes: any; + PRHeader: any;//change the tpye later + PRLines: any;//change the tpye later + IsReachEnd: boolean = true; + P_PAGE_NUM: number = 1; + P_PAGE_LIMIT: number = 100; + headerTotal: any; + totalH: any; + valueH: any; + taxH: any; + taxvalueH: any; + NotificationGetRespondAttributesList: any; + confirmMsg: string; + delMsg: string; + closeMsg: string; + POHeader: any; + POLines: any; + PO_NUMBER: any; + itemHistoryRes: any; + QutationAnalysisRes: any; + activeSegment: any = "line_details"; + lines_note_limit: number = 24; + notiActionBtnMore: any = []; + demoeAttach: any = []; + orgNote: any; + truncating: boolean = true; + hidden: boolean = true; + selectedIndex = -1; + showLessBtn: boolean; + showMoreBtn: boolean = true; + selectedAction: any = []; + messageSuccess: boolean = false; + approveDis: boolean = false; + rejectDis: boolean = false; + requestDis: boolean = false; + moreDisabled: boolean = true; + direction: string; + defaultSegment = ''; + approve_label: any; + reject_label: any; + reqInfo_label: any; + closeDis: boolean = false; + selectedFilter: string; +; + close_label: any; + + constructor( + public common: CommonService, + public ts: TranslatorService, + public worklistMainService: WorklistMainService, + public elementRef: ElementRef, + public menuService: MenuService, + public events: Events, + public worklistAttachService: WorklistAttachService, + private modalCtrl: ModalController, + public worklistService: WorklistService, + public dashboredService: DashboredService, + + ) { + this.direction = TranslatorService.getCurrentLanguageName() + this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); + this.WorkListActionHistoryObj.P_PAGE_NUM = 1; + this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + } + + ngOnInit() { + this.WorkListAttachObj = new WorkListButtonRequest(); + this.selectedFilter = this.common.sharedService.getSharedData('selectedFilter', false); + this.intializeNotificationDetail(); + }//ngOn + + + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + if (this.activeSegment === 'line_details') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'info') { + this.slides.slideTo(3); + } + // console.log(" event.detail.value: " + event.detail.value); + } + + public slideChanged(event: any) { + this.slides.getActiveIndex().then(index => { + // console.log(index); + // console.log(event); + if (index === 0) { + this.activeSegment = 'line_details'; + } + else if (index === 1) { + this.activeSegment = 'action-history'; + } + else if (index === 2) { + this.activeSegment = 'attach'; + } + else if (index === 3) { + this.activeSegment = 'info'; + } + // console.log(this.activeSegment); + }); + } + + + + + intializeNotificationDetail() { + this.approveDis = false; + this.rejectDis = false; + this.requestDis = false; + this.closeDis = false; + this.moreDisabled = true; + + if (this.messageSuccess) { + document.getElementById("notificationDynamicFieldsPO").innerHTML = ""; + } + // console.log("intializeNotificationDetail"); + this.getPassNotificationDetails = this.common.sharedService.getSharedData( + HomeComponent.NOTIFICATION_DATA, + false + ); + // console.log(this.getPassNotificationDetails.ROW_NUM); + this.notificationArray = this.common.sharedService.getSharedData( + HomeComponent.NOTIFICATION_ARR, + false + ); + this.WorkListBodyObj = new WorkListBodyRequest(); + this.WorkListButtonsObj = new WorkListButtonRequest(); + + this.WorkListActionObj = new WorkListActionRequest(); + + this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID; + this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + this.WorkListBodyObj.P_PAGE_NUM = 1; + this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + + this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_ACTION_MODE = ""; + this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_APPROVER_INDEX = null; + + this.WorkListActionHistoryObj.P_PAGE_NUM = 1; + this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + this.getNotificationButtons(this.WorkListButtonsObj); + this.getNotificationResAttr(this.WorkListButtonsObj); + this.getActionHistory(this.WorkListActionHistoryObj); + this.getAttachmentNotification(this.WorkListAttachObj); + + + if (this.getPassNotificationDetails.REQUEST_TYPE == "ITEM_CREATION") { + this.getICNotificationDetails(this.WorkListBodyObj); + } + } + + public segmentChanged1(event: any) { + this.activeSegment = event.detail.value; + // console.log(" event.detail.value: " + event.detail.value); + } + + getICNotificationDetails(notificationBodyObj) { + this.worklistMainService + .getICNotificationBody(notificationBodyObj) + .subscribe((result: any) => { + // console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); + this.handleWorkListBodyResult(result, "IC"); + }); + } + + handleWorkListBodyResult(result, Type) { + this.notificationBodyRes = []; + if (this.common.validResponse(result)) { + this.pInformation = result.P_INFORMATION; + this.pQuestion = result.P_QUESTION; + if (Type == "EIT") { + if (result.GetEITCollectionNotificationBodyList) { + this.notificationBodyRes = + result.GetEITCollectionNotificationBodyList; + } + } else if (Type == "ABSENCE") { + // console.log("ABSENCE"); + if (result.GetAbsenceCollectionNotificationBodyList) { + this.notificationBodyRes = + result.GetAbsenceCollectionNotificationBodyList; + } + } else if (Type == "PR") { + if (result.GetPrNotificationBodyList) { + // console.log("PR"); + + this.PRHeader = result.GetPrNotificationBodyList.PRHeader; + this.PRLines = result.GetPrNotificationBodyList.PRLines; + for (var i = 0; i < this.PRHeader.length; i++) { + if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.PRHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.PRHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + + } + + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPrNotificationBodyList; + } + + } else if (Type == "PO") { + if (result.GetPoNotificationBodyList) { + // console.log("PO"); + + this.POHeader = result.GetPoNotificationBodyList.POHeader; + this.POLines = result.GetPoNotificationBodyList.POLines; + for (var i = 0; i < this.POHeader.length; i++) { + this.PO_NUMBER = this.POHeader[i].PO_NUMBER; + + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + } + + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPoNotificationBodyList; + } + } else if (Type == "IC") { + if (result.GetItemCreationNtfBodyList) { + this.POHeader = result.GetItemCreationNtfBodyList.ItemCreationHeader; + this.POLines = result.GetItemCreationNtfBodyList.ItemCreationLines; + for (var i = 0; i < this.POHeader.length; i++) { + this.PO_NUMBER = this.POHeader[i].PO_NUMBER; + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + } + + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPoNotificationBodyList; + } + }// + } + } //End handleWorkListBodyResult + + + + + getNotificationButtons(notificationButtonsObj) { + this.worklistMainService + .getNotificationButtons(notificationButtonsObj) + .subscribe((result: NotificatonButtonResponse) => { + this.handleWorkListButtonsResult(result); + }); + } + + handleWorkListButtonsResult(result) { + if (this.common.validResponse(result)) { + this.notiActionBtnMore = [] + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetNotificationButtonsList != null) { + this.notificationButtonRes = result.GetNotificationButtonsList; + this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); + // console.log("test" + this.notificationButtonRes.length); + for (let i = 0; i < this.notificationButtonRes.length; i++) { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; + + this.approveDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.rejectDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; + + this.requestDis = true; + } // if result == null + else if // if result == null + (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { + this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.closeDis = true; + } + else if ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { + this.moreDisabled = false; + + } + + } // valid it + + } // valid it + } // End handleWorkListButtonsResult + + + } + applyAction(WorkListActionObj) { + // console.log("applyactio"); + this.worklistMainService + .actionButton(WorkListActionObj) + .subscribe((result: any) => { + this.handleApplayActionResult(result); + }); + } + + handleApplayActionResult(result) { + if (this.common.validResponse(result)) { + // tslint:disable-next-line: triple-equals + if (result.MessageStatus == 1) { + this.common.sharedService.setSharedData(true, 'loadWorkList'); + this.messageSuccess = true; + setTimeout(() => { + this.messageSuccess = false; + // this.openNotificationsDashboard(); + this.nextNotfification(); + }, 5000); + } + } // valid it + } + + // public nextNotfification() { + // //let itemExist = false; + // let itemNo = this.getPassNotificationDetails.ROW_NUM; + // itemNo += 1; + // if (itemNo > this.notificationArray.length) { + // this.common.openNotificationPage(); + // } else { + // for (let i = 0; i < this.notificationArray.length; i++) { + // if (this.notificationArray[i].ROW_NUM == itemNo) { + // this.common.sharedService.setSharedData(this.notificationArray[i], HomeComponent.NOTIFICATION_DATA); + // // itemExist = true; + // this.intializeNotificationDetail(); + // break; + // } + // } + // // if(itemExist==false){ + // // this.nextNotfification(); + // // } + // } + // } + + public nextNotfification() { + if (document.getElementById('notificationDynamicFieldsPO') != null) { + document.getElementById('notificationDynamicFieldsPO').innerHTML = ''; + } + + let itemNo = this.getPassNotificationDetails.ROW_NUM; + let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); + let previousRequest = this.notificationArray[index].REQUEST_TYPE; + let previousRequestType = this.notificationArray[index].ITEM_TYPE; + index += 1; + + if (index < this.notificationArray.length) { + this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); + this.activeSegment = 'line_details'; + if(this.selectedFilter === 'ALL'){ + this.checkRequestType(index); + } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { + this.checkRequestType(index); + }else { + this.common.openNotificationPage(); + } + } else { + this.common.openNotificationPage(); + } + } + + + checkRequestType(index){ + if (this.notificationArray[index].REQUEST_TYPE === 'PO') { + this.intializeNotificationDetail(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'PR') { + this.common.openWorklistMainPRPage(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'MO') { + this.common.openWorklistMainMRPage(); + } else { + this.common.openWorklistMainPage(); + } + } + + actionButton(action) { + + // console.log("actionButton" + action); + // alert("don't forget"); + //let ButtonAction: string = this.actionType; + let ButtonAction: string = action; + + var responseAttrDic = this.notExampleJsonObject; + this.P_RESPOND_ATTRIBUTES_TBL = []; + for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { + let obj: any = {}; + obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME; + if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") { + obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; + } + // else if (isDate(responseAttrDic[key])) { + // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; + // } + else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; + } + this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + } + // console.log("a" + this.P_RESPOND_ATTRIBUTES_TBL); + + let repUserName = this.selEmployeeID; + // if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { + // let obj: any = {}; + // repUserName = ""; + // obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; + // obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; + // this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + // } + + if ( + ButtonAction == "APPROVE" || + ButtonAction == "REJECT" || + ButtonAction == "DEL" || + ButtonAction == "CLOSE" + ) { + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_ACTION_MODE = ButtonAction; + this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; + + //sheardData + + // this.common.sharedService.setSharedData( + // this.WorkListActionObj, + // WorklistMainPRComponent.PASS_NOTIFICATION_INFO + // ); + if (ButtonAction == "APPROVE") { + this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') + } + else if (ButtonAction == "REJECT") { + this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') + + } + else if (ButtonAction == "DEL") { + this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg') + + } + else if (ButtonAction == "CLOSE") { + this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') + + } + + this.common.confirmAlertDialogAction( + () => { + this.applyAction(this.WorkListActionObj); + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg); + + + + + + // alert.onDidDismiss((data) => { + // if (data == true) { + // this.continueDelete(attach); + // } + // }); + + //this.openApplyModal(this.WorkListActionObj); + + + + ////////////this.applyAction(this.WorkListActionObj); + } + + if (ButtonAction == "RFC") { + // alert("Return For Correction"); + this.WorkListActionObj.P_ACTION_MODE = ButtonAction; + // this.navCtrl.push("WorkListRfcPage", { + // passNotificationInfo: this.getPassNotificationDetails, + // passActionMode: ButtonAction, + // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.sharedService.setSharedData( + ButtonAction, + WorklistMainIcComponent.PASS_ACTION_MODE + ); + this.common.sharedService.setSharedData( + this.P_RESPOND_ATTRIBUTES_TBL, + WorklistMainIcComponent.PASS_RES_ATTR + ); + //this.common.openWorklistRFCPage(); + this.openRFCModal(); + } else if (ButtonAction == "ANSWER_INFO") { + // this.navCtrl.push("WorkListReplacmentRollPage", { + // pQuestion: this.pQuestion, + // passNotificationInfo: this.getPassNotificationDetails, + // passActionMode: ButtonAction, + // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL + // }); + this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.sharedService.setSharedData( + ButtonAction, + WorklistMainIcComponent.PASS_ACTION_MODE + ); + this.common.sharedService.setSharedData( + this.P_RESPOND_ATTRIBUTES_TBL, + WorklistMainIcComponent.PASS_RES_ATTR + ); + // console.log("c" + this.P_RESPOND_ATTRIBUTES_TBL); + + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); + } else if ( + ButtonAction == "DELEGATE" || + ButtonAction == "REQUEST_INFO" || + ButtonAction == "TRANSFER" || + ButtonAction == "TRANSFER_INFO" || + ButtonAction == "APPROVE_AND_FORWARD" || + ButtonAction == "FORWARD" + + + ) { + // alert("multi option: "+ ButtonAction); + this.WorkListActionObj.P_ACTION_MODE = ButtonAction; + // this.navCtrl.push("WorkListReplacmentRollPage", { + // passNotificationInfo: this.getPassNotificationDetails, + // passActionMode: ButtonAction, + // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.sharedService.setSharedData( + ButtonAction, + WorklistMainIcComponent.PASS_ACTION_MODE + ); + this.common.sharedService.setSharedData( + this.P_RESPOND_ATTRIBUTES_TBL, + WorklistMainIcComponent.PASS_RES_ATTR + ); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); + } else if ( + ButtonAction == "UPDATE_ACTION" || + ButtonAction == "CONTINUE_ACTION" + ) { + if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + EITNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + EITNotificatonBodyResponse.NOT_WORKLIST + ); + // this.navCtrl.push("EitUpdateListPage"); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + AbsenceNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + AbsenceNotificatonBodyResponse.NOT_WORKLIST + ); + // this.navCtrl.push("SubmitAbsencePage", { + // dirfromNotificationPage: true, + // submitAbsObjList: this.notificationBodyRes[0].Collection_Notification + // }); + this.common.openConfirmAbsece(); + } + } + else if (this.notificationButtonRes.length > 0 && !ButtonAction) { + (this.elementRef.nativeElement.querySelectorAll( + "ion-item" + ) as HTMLElement[]).forEach(x => { + if (x.classList.contains("requiredItem")) { + x.classList.add("ng-touched"); + x.classList.remove("ng-untouched"); + } + }); + this.common.presentAlert( + this.ts.trPK("worklistMain", "actionRequird") + ); + } + } + + openActionHistory() { + // this.navCtrl.push("WorkListActionHistoryPage", { + // passNotificationInfo: this.getPassNotificationDetails + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.openWorklistHistoryPage(); + } + + + + openSupportDocuments() { + // this.navCtrl.push("WorkListAttachPage", { + // passNotificationInfo: this.getPassNotificationDetails + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.openWorklistAttachPage(); + } + + getNotificationResAttr(notificationButtonsObj) { + // console.log("getNotificationResAttr"); + this.NotRespondAttributeList = []; + + this.worklistMainService + .notificationResponseAttr(notificationButtonsObj) + .subscribe((result: NotificatonButtonResponse) => { + this.handleNotificationResAttrResult(result); + }); + } + + handleNotificationResAttrResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + this.NotRespondAttributeList = + result.NotificationGetRespondAttributesList; + if ( + result.NotificationRespondRolesList != "" && + result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && + result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined + ) { + this.Resp2_val = result.NotificationRespondRolesList[0].ATTRIBUTE_NAME; + this.hideForwordEmployee = result.NotificationRespondRolesList[0]; + } + this.notificationDynamicFields(result.NotificationGetRespondAttributesList); + this.NotificationGetRespondAttributesList = result.NotificationGetRespondAttributesList; + + this.common.sharedService.setSharedData( + this.NotificationGetRespondAttributesList, + WorklistMainIcComponent.PASS_RES_ATTR + ); + + this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList; + if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema); + } // valid it + } // End handleWorkListButtonsResult + + notificationDynamicFields(notificationAttr) { + const containerId = 'notificationDynamicFieldsPO'; + for (let i = 0; i < notificationAttr.length; i++) { + if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); + // console.log(this.textArea); + + } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { + + } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { + + } else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") { + + } + } + } + + openNotificationBody() { + if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + EITNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + EITNotificatonBodyResponse.NOT_WORKLIST + ); + // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); + this.common.sharedService.setSharedData("EIT", "NotBodyType"); + this.common.openNotificationDetailsPage(); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + AbsenceNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + AbsenceNotificatonBodyResponse.NOT_WORKLIST + ); + this.common.sharedService.setSharedData("ABSENCE", "NotBodyType"); + //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); + this.common.openNotificationDetailsPage(); + } + } + + // getNotificationCountAfterSubmit() { + // const req: any = {}; + // this.menuService.getNotificationCount(req).subscribe((result: any) => { + // if (this.common.validResponse(result)) { + // this.notificationCount = + // result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM; + // if (this.notificationCount <= 0) { + // this.notificationCount = null; + // } + // this.events.publish("getNotCount", this.notificationCount); + // } + // }); + // } + + + + + getAttachmentNotification(WorkListAttachObj) { + this.attachmentRes = []; + this.worklistAttachService.getAttach(WorkListAttachObj). + subscribe((result: NotificationGetAttachResponse) => { + this.handleWorkListAttachResult(result); + }); + } + + handleWorkListAttachResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + } + + getActionHistory(WorkListActionHistoryObj) { + this.IsReachEnd = true; + this.actionHistoryRes = []; + this.worklistService.getActionHistory(WorkListActionHistoryObj). + subscribe((result: WorkListActionHistoryResponse) => { + this.handleWorkListActionHistoryResult(result); + }); + + + } + handleWorkListActionHistoryResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetActionHistoryList)) { + this.actionHistoryRes = result.GetActionHistoryList; + + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + let lastItemIndex = this.actionHistoryRes.length - 1; + if (result.GetActionHistoryList[lastItemIndex]) { + let lastitem = result.GetActionHistoryList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + } + } + this.turnCateFun(this.actionHistoryRes); + + } + } + + async openNoteDetail(note, sender) { + // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); + // modalPage.present(); + // console.log("note" + note); + + this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') + this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') + + const modal = await this.modalCtrl.create({ + component: ViewNoteModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + return await modal.present(); + } + + doInfinite(infiniteScroll) { + // console.log("doInfinite action history"); + if (!this.IsReachEnd) { + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => infiniteScroll.target.complete()); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + infiniteScroll.target.complete(); + + }); + } else { + if (infiniteScroll) + infiniteScroll.target.complete(); + } + }//end infiniteScroll + + //**********Attachment *****************// + + + async OpenAttachFiles(value, Type) { + // let modal: Modal = this.modalCtrl.create('WorkListAttachViewPage', { displayData: value, TypeData: Type }); + // modal.present(); + + this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage') + const modal = await this.modalCtrl.create({ + component: WorkListAttachViewComponent + }); + + return await modal.present(); + } + + getItemHistory(itemID) { + // console.log(itemID); + this.IsReachEnd = false; + const request = new POItemHistoryRequest(); + request.P_ITEM_ID = parseInt(itemID); + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; + this.worklistMainService.getPOItemHistory(request). + subscribe((result: POItemHistoryRes) => { + // this.common.sharedService.setSharedData( + // result.GetItemHistoryList, + // WorklistMainIcComponent.ItemHistoryList + // ); + this.common.sharedService.setSharedData( + itemID, + WorklistMainIcComponent.PASS_PO_INFO + ); + //open page + // this.common.openItemHistoryPage(); + this.handleItemHistoryResult(result); + }); + } + + + handleItemHistoryResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetPoItemHistoryList)) { + this.common.openItemHistoryPage(); + + } + } + else { + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); + } + + } + + getQutationAnalysis(headerID, itemID) { + // console.log(itemID + headerID); + this.IsReachEnd = false; + const request = new QuotationAnalysisRequest(); + request.P_ITEM_ID = parseInt(itemID); + request.P_PO_HEADER_ID = headerID; + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; + this.worklistMainService.getQutationAnalysis(request). + subscribe((result: QuotationAnalysisResponse) => { + this.common.sharedService.setSharedData( + itemID, + WorklistMainIcComponent.PASS_PO_INFO + ); + this.common.sharedService.setSharedData( + headerID, + WorklistMainIcComponent.PASS_PO_HEADER_ID + ); + //open page + + this.handleQutationAnalysisResult(result); + }); + + + } + handleQutationAnalysisResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetQuotationAnalysisList)) { + + //open page + //set sheard data + // + + this.common.openQutationAnalysisPage(); + + + // this.QutationAnalysisRes = result.GetQutationAnalysisList; + // this.P_PAGE_NUM++; + // let lastItemIndex = this.QutationAnalysisRes.length - 1; + // if (result.GetQutationAnalysisList[lastItemIndex]) { + // let lastitem = result.GetQutationAnalysisList[lastItemIndex]; + // if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + // this.IsReachEnd = true; + // } else { + // this.IsReachEnd = false; + // } + // } + }//hasData + else { + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); + } + + } + } + + loadMoreNotificationBody() { + // console.log("loadMoreNotificationBody PO"); + if (!this.IsReachEnd) { + // console.log("this.IsReachEnd" + this.IsReachEnd); + + this.worklistMainService.getPONotificationBody(this.WorkListBodyObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetPoNotificationBodyList != undefined) { + this.P_PAGE_NUM++; + this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM; + (result.GetPoNotificationBodyList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.notificationBodyRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") + ); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + // if (infiniteScroll) + // infiniteScroll.target.complete(); + } + }//end infiniteScroll + + loadMoreActionHistory() { + console.log("doInfinite action history MR"); + + if (!this.IsReachEnd) { + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + //if (infiniteScroll) + //infiniteScroll.target.complete(); + } + }//end infiniteScroll + + async openMoreActions() { + + + + + const modal = await this.modalCtrl.create({ + component: MoreActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + // this.selectedAction = data.data; + this.actionType = data.data.BUTTON_ACTION; + console.log(this.actionType); + ///call Action button + this.actionButton(this.actionType); + } + }); + + return await modal.present(); + + + + + } + + /////////////////////////////////////////// + + public checkLines(note) { + console.log(note.split("\n").length); + console.log(note.length); + + if (note && note != null) { + + + return (note.length > this.lines_note_limit) ? true : false; + + + + } + + + + return false; + }; + + + public turnCateFun(actionHis) { + for (let i = 0; i < actionHis.length; i++) { + actionHis[i].visible = false; + + } + // actionHis.map((obj) => { + // obj.visible = false; + // // or via brackets + // // obj['total'] = 2; + // return obj; + // }) + this.actionHistoryRes = actionHis; + console.log("test"); + } + + async openRepRolModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListReplacementRollComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data.data == "cancel" || data.data.data == undefined) { + return; + } else if (data.data.data == "Success") { + // this.openNotificationsDashboard(); + this.messageSuccess = true; + setTimeout(() => { + this.messageSuccess = false; + this.nextNotfification(); + }, 2000); + // this.nextNotfification(); + + } + }); + + return await modal.present(); + + + + + } + + async openRFCModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListRfcComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + + openNotificationsDashboard() { + this.dashboredService.getOpenNotifications('', '', this.isPostNoLoad).subscribe((result: GetOpenNotificationsResponse) => { + if (this.common.validResponse(result)) { + this.worklistNotifications = result; + this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; + this.common.sharedService.setSharedData(result, 'worklistNotifications'); + } + }); + } + + +} diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 02711308..43de0020 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -248,7 +248,7 @@ - +

{{ 'general, notAttch' | translate}}

From 5619ad7ba8d1d9857ccd7b8ba74006f2272ef47a Mon Sep 17 00:00:00 2001 From: enadhilal Date: Sun, 23 May 2021 15:55:31 +0300 Subject: [PATCH 5/6] add translate in IC --- .../worklist-main-ic.component.html | 172 ++++-------------- Mohem/src/assets/localization/i18n.json | 116 ++++++++++++ 2 files changed, 148 insertions(+), 140 deletions(-) diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html index 6050b9d4..8c45af78 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html @@ -50,207 +50,141 @@ -
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +

-
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 4ec28a25..b4a33926 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2036,6 +2036,122 @@ "empty-comment": { "en": "you shoud add comment", "ar": "يجب عليك اضافة تعليق" + }, + "product-name":{ + "en":"Product Name", + "ar":"اسم المنتج" + }, + "product-description":{ + "en":"Product Description", + "ar":"وصف للمنتج" + }, + "Unit-price":{ + "en":"Unit Price", + "ar":"سعر الوحدة" + }, + "manufacturer-name":{ + "en":"Manufacturer Name", + "ar":"اسم المصنع" + }, + "manufacturer-part-number":{ + "en":"Manufacturer Part Number", + "ar":"رقم قطعة المصنع" + }, + "supplier-name":{ + "en":"Supplier Name", + "ar":"اسم المورد" + }, + "supplier-contact":{ + "en":"Supplier Contact", + "ar":"عقد المورد" + }, + "charge-to-patient":{ + "en":"Charge to Patient", + "ar":"رسوم على المرضى" + }, + "justification":{ + "en":"Justification", + "ar":"تبرير" + }, + "item-code":{ + "en":"Item Code", + "ar":"رمز الصنف" + }, + "item-description":{ + "en":"Item Description", + "ar":"وصف الصنف" + }, + "group-code":{ + "en":"Group Code", + "ar":"رمز المجموعة" + }, + "group-description":{ + "en":"Group Description", + "ar":"وصف المجموعة" + }, + "subgroup-code":{ + "en":"Subgroup Code", + "ar":"رمز المجموعة الفرعية" + }, + "subgroup-description":{ + "en":"Subgroup Description", + "ar":"وصف المجموعة الفرعية" + }, + "primary-uom":{ + "en":"Primary UOM", + "ar":"Primary UOM" + }, + "template-name":{ + "en":"Template Name", + "ar":"اسم القالب" + }, + "item-creation-status":{ + "en":"Item Creation Status", + "ar":"حالة انشاء العنصر" + }, + "standardization-approval-status":{ + "en":"Standardization Approval Status", + "ar":"حالةالموافقة على المعايرة" + }, + "standardization-approval-rejection-reason":{ + "en":"Standardization Approval Rejection Reason", + "ar":"سبب رفض الموافقة على المعايرة" + }, + "category":{ + "en":"Category", + "ar":"فئة" + }, + "requester":{ + "en":"Requester", + "ar":"مقدم الطلب" + }, + "analyzed-by":{ + "en":"Analyzed By", + "ar":"تحليل بواسطة" + }, + "approved-date":{ + "en":"Approved Date", + "ar":"تاريخ الموافقة" + }, + "item-type":{ + "en":"Item Type", + "ar":"نوع الصنف" + }, + "related-to":{ + "en":"Related To", + "ar":"" + }, + "request-date":{ + "en":"Request Date", + "ar":"متعلق بـ" + }, + "analyzed-date":{ + "en":"Analyzed Date", + "ar":"تاريخ التحليل" + }, + "urgent":{ + "en":"Urgent", + "ar":"عاجل" } }, "worklistMain": { From 671bd53ca1e5ad00be428d8cb19f38ecdb761380 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 26 May 2021 12:03:02 +0300 Subject: [PATCH 6/6] worklist for IC --- .../worklist-main-ic.component.html | 133 +++++++++--------- .../worklist-main-ic.component.scss | 126 +++-------------- .../worklist-main-ic.component.ts | 19 +-- 3 files changed, 94 insertions(+), 184 deletions(-) diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html index 8c45af78..7a2abd94 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html @@ -202,78 +202,79 @@ - - - -
-

{{ 'general, empty' | translate}}

-
-
- -
- - -
- -
- - -
-
- - - {{actionHistory.NAME}} - - -
-
-
-
- Note: {{actionHistory.NOTE}} -
-
- - -
- -
- Note: {{actionHistory.NOTE}} - - -
- + + -
+
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{actionHistory.NOTIFICATION_DATE| dateString }} +
+ + + + + +
+
- -
- {{actionHistory.ACTION}} - - - - {{actionHistory.NOTIFICATION_DATE| - dateString }} - - - +
- -
- - + + - + + diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss index ffee0278..409f7446 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss @@ -1,112 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 16px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } - -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } - -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } .no-padding-label { padding: 0px !important; @@ -141,4 +32,19 @@ .action-btn { white-space: nowrap; font-size: 10px; - } \ No newline at end of file + } + .name{ + color:black !important ;font-weight: bold; + } + .timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; + } + .req_info{ + width: 25px; + height: 25px; + display: inline-block; + margin: 5px; + } + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts index 0e6f77e5..a2569368 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts @@ -37,7 +37,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/ import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; -import { IonSlides } from '@ionic/angular';​ +import { IonSlides } from '@ionic/angular'; @Component({ selector: 'app-worklist-main-ic', @@ -129,7 +129,7 @@ export class WorklistMainIcComponent implements OnInit { reqInfo_label: any; closeDis: boolean = false; selectedFilter: string; -; + ; close_label: any; constructor( @@ -472,11 +472,11 @@ export class WorklistMainIcComponent implements OnInit { if (index < this.notificationArray.length) { this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); this.activeSegment = 'line_details'; - if(this.selectedFilter === 'ALL'){ - this.checkRequestType(index); + if (this.selectedFilter === 'ALL') { + this.checkRequestType(index); } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { this.checkRequestType(index); - }else { + } else { this.common.openNotificationPage(); } } else { @@ -485,7 +485,7 @@ export class WorklistMainIcComponent implements OnInit { } - checkRequestType(index){ + checkRequestType(index) { if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.intializeNotificationDetail(); } else @@ -1193,7 +1193,7 @@ export class WorklistMainIcComponent implements OnInit { async openRepRolModal() { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, @@ -1267,6 +1267,9 @@ export class WorklistMainIcComponent implements OnInit { } }); } - + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } }