diff --git a/Mohem/package.json b/Mohem/package.json
index 2ee2b6c1..6267ed09 100644
--- a/Mohem/package.json
+++ b/Mohem/package.json
@@ -125,6 +125,7 @@
"tslib": "^1.10.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"xlsx": "^0.14.3",
+ "xml-js": "^1.6.11",
"zone.js": "~0.8.29"
},
"devDependencies": {
@@ -242,8 +243,8 @@
"cordova-plugin-filechooser": {}
},
"platforms": [
- "android",
- "ios"
+ "ios",
+ "android"
]
}
}
\ No newline at end of file
diff --git a/Mohem/resources/android/icon/drawable-hdpi-icon.png b/Mohem/resources/android/icon/drawable-hdpi-icon.png
index 52836c3f..3cdd3e68 100644
Binary files a/Mohem/resources/android/icon/drawable-hdpi-icon.png and b/Mohem/resources/android/icon/drawable-hdpi-icon.png differ
diff --git a/Mohem/resources/android/icon/drawable-ldpi-icon.png b/Mohem/resources/android/icon/drawable-ldpi-icon.png
index 8fc379ef..ab8a4712 100644
Binary files a/Mohem/resources/android/icon/drawable-ldpi-icon.png and b/Mohem/resources/android/icon/drawable-ldpi-icon.png differ
diff --git a/Mohem/resources/android/icon/drawable-mdpi-icon.png b/Mohem/resources/android/icon/drawable-mdpi-icon.png
index 0ade9487..e3843731 100644
Binary files a/Mohem/resources/android/icon/drawable-mdpi-icon.png and b/Mohem/resources/android/icon/drawable-mdpi-icon.png differ
diff --git a/Mohem/resources/android/icon/drawable-xhdpi-icon.png b/Mohem/resources/android/icon/drawable-xhdpi-icon.png
index 92c4139f..95d761f0 100644
Binary files a/Mohem/resources/android/icon/drawable-xhdpi-icon.png and b/Mohem/resources/android/icon/drawable-xhdpi-icon.png differ
diff --git a/Mohem/resources/android/icon/drawable-xxhdpi-icon.png b/Mohem/resources/android/icon/drawable-xxhdpi-icon.png
index 2d82d78e..a26404ea 100644
Binary files a/Mohem/resources/android/icon/drawable-xxhdpi-icon.png and b/Mohem/resources/android/icon/drawable-xxhdpi-icon.png differ
diff --git a/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png b/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png
index 526f775d..496f8feb 100644
Binary files a/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png and b/Mohem/resources/android/icon/drawable-xxxhdpi-icon.png differ
diff --git a/Mohem/resources/android/splash/drawable-land-hdpi-screen.png b/Mohem/resources/android/splash/drawable-land-hdpi-screen.png
index 1332bc2a..402cd511 100644
Binary files a/Mohem/resources/android/splash/drawable-land-hdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-hdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-land-ldpi-screen.png b/Mohem/resources/android/splash/drawable-land-ldpi-screen.png
index b78e93c2..0a0dc2b1 100644
Binary files a/Mohem/resources/android/splash/drawable-land-ldpi-screen.png and b/Mohem/resources/android/splash/drawable-land-ldpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-land-mdpi-screen.png b/Mohem/resources/android/splash/drawable-land-mdpi-screen.png
index e3ab5a74..c1c71530 100644
Binary files a/Mohem/resources/android/splash/drawable-land-mdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-mdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png b/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png
index ce6751f9..4edf9e2b 100644
Binary files a/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-xhdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png b/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png
index 7cb6c5d4..9e349a24 100644
Binary files a/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-xxhdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png b/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png
index 5c8d7780..50f6e027 100644
Binary files a/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-land-xxxhdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-port-hdpi-screen.png b/Mohem/resources/android/splash/drawable-port-hdpi-screen.png
index 8c6d2884..48313b69 100644
Binary files a/Mohem/resources/android/splash/drawable-port-hdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-hdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-port-ldpi-screen.png b/Mohem/resources/android/splash/drawable-port-ldpi-screen.png
index 3d032253..119e4fd5 100644
Binary files a/Mohem/resources/android/splash/drawable-port-ldpi-screen.png and b/Mohem/resources/android/splash/drawable-port-ldpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-port-mdpi-screen.png b/Mohem/resources/android/splash/drawable-port-mdpi-screen.png
index 7bdff474..3c81f3f3 100644
Binary files a/Mohem/resources/android/splash/drawable-port-mdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-mdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png b/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png
index ea1e6d1b..514ac6ea 100644
Binary files a/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-xhdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png b/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png
index ae12e6d7..300d7590 100644
Binary files a/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-xxhdpi-screen.png differ
diff --git a/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png b/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png
index 61b334b0..e100b38e 100644
Binary files a/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/Mohem/resources/android/splash/drawable-port-xxxhdpi-screen.png differ
diff --git a/Mohem/resources/ios/splash/Default-1792h~iphone.png b/Mohem/resources/ios/splash/Default-1792h~iphone.png
index 32bfdf68..de648a84 100644
Binary files a/Mohem/resources/ios/splash/Default-1792h~iphone.png and b/Mohem/resources/ios/splash/Default-1792h~iphone.png differ
diff --git a/Mohem/resources/ios/splash/Default-2436h.png b/Mohem/resources/ios/splash/Default-2436h.png
index b46f08da..bbc65015 100644
Binary files a/Mohem/resources/ios/splash/Default-2436h.png and b/Mohem/resources/ios/splash/Default-2436h.png differ
diff --git a/Mohem/resources/ios/splash/Default-2688h~iphone.png b/Mohem/resources/ios/splash/Default-2688h~iphone.png
index f7fa4004..44e99167 100644
Binary files a/Mohem/resources/ios/splash/Default-2688h~iphone.png and b/Mohem/resources/ios/splash/Default-2688h~iphone.png differ
diff --git a/Mohem/resources/ios/splash/Default-568h@2x~iphone.png b/Mohem/resources/ios/splash/Default-568h@2x~iphone.png
index c5579ce2..7e896780 100644
Binary files a/Mohem/resources/ios/splash/Default-568h@2x~iphone.png and b/Mohem/resources/ios/splash/Default-568h@2x~iphone.png differ
diff --git a/Mohem/resources/ios/splash/Default-667h.png b/Mohem/resources/ios/splash/Default-667h.png
index e66421e4..7d594cd5 100644
Binary files a/Mohem/resources/ios/splash/Default-667h.png and b/Mohem/resources/ios/splash/Default-667h.png differ
diff --git a/Mohem/resources/ios/splash/Default-736h.png b/Mohem/resources/ios/splash/Default-736h.png
index feb197c4..968d2652 100644
Binary files a/Mohem/resources/ios/splash/Default-736h.png and b/Mohem/resources/ios/splash/Default-736h.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape-1792h~iphone.png b/Mohem/resources/ios/splash/Default-Landscape-1792h~iphone.png
index ecd93d4e..83d41fc3 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape-1792h~iphone.png and b/Mohem/resources/ios/splash/Default-Landscape-1792h~iphone.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape-2436h.png b/Mohem/resources/ios/splash/Default-Landscape-2436h.png
index 57f48e36..d6eaea82 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape-2436h.png and b/Mohem/resources/ios/splash/Default-Landscape-2436h.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape-2688h~iphone.png b/Mohem/resources/ios/splash/Default-Landscape-2688h~iphone.png
index 5cb21ce5..3a9f1cff 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape-2688h~iphone.png and b/Mohem/resources/ios/splash/Default-Landscape-2688h~iphone.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape-736h.png b/Mohem/resources/ios/splash/Default-Landscape-736h.png
index 94279e8d..e5676901 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape-736h.png and b/Mohem/resources/ios/splash/Default-Landscape-736h.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape@2x~ipad.png b/Mohem/resources/ios/splash/Default-Landscape@2x~ipad.png
index 42f9ad81..fd5d631b 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape@2x~ipad.png and b/Mohem/resources/ios/splash/Default-Landscape@2x~ipad.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape@~ipadpro.png b/Mohem/resources/ios/splash/Default-Landscape@~ipadpro.png
index 2c668e2a..8baf6a25 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape@~ipadpro.png and b/Mohem/resources/ios/splash/Default-Landscape@~ipadpro.png differ
diff --git a/Mohem/resources/ios/splash/Default-Landscape~ipad.png b/Mohem/resources/ios/splash/Default-Landscape~ipad.png
index 6ae97f37..1a2d347e 100644
Binary files a/Mohem/resources/ios/splash/Default-Landscape~ipad.png and b/Mohem/resources/ios/splash/Default-Landscape~ipad.png differ
diff --git a/Mohem/resources/ios/splash/Default-Portrait@2x~ipad.png b/Mohem/resources/ios/splash/Default-Portrait@2x~ipad.png
index aadf081c..7df04c35 100644
Binary files a/Mohem/resources/ios/splash/Default-Portrait@2x~ipad.png and b/Mohem/resources/ios/splash/Default-Portrait@2x~ipad.png differ
diff --git a/Mohem/resources/ios/splash/Default-Portrait@~ipadpro.png b/Mohem/resources/ios/splash/Default-Portrait@~ipadpro.png
index 9be2cdb4..bcaee208 100644
Binary files a/Mohem/resources/ios/splash/Default-Portrait@~ipadpro.png and b/Mohem/resources/ios/splash/Default-Portrait@~ipadpro.png differ
diff --git a/Mohem/resources/ios/splash/Default-Portrait~ipad.png b/Mohem/resources/ios/splash/Default-Portrait~ipad.png
index 91d66c5a..76817d12 100644
Binary files a/Mohem/resources/ios/splash/Default-Portrait~ipad.png and b/Mohem/resources/ios/splash/Default-Portrait~ipad.png differ
diff --git a/Mohem/resources/ios/splash/Default@2x~iphone.png b/Mohem/resources/ios/splash/Default@2x~iphone.png
index 0e4c5964..439a7d25 100644
Binary files a/Mohem/resources/ios/splash/Default@2x~iphone.png and b/Mohem/resources/ios/splash/Default@2x~iphone.png differ
diff --git a/Mohem/resources/ios/splash/Default@2x~universal~anyany.png b/Mohem/resources/ios/splash/Default@2x~universal~anyany.png
index 0e6a828c..18e6244c 100644
Binary files a/Mohem/resources/ios/splash/Default@2x~universal~anyany.png and b/Mohem/resources/ios/splash/Default@2x~universal~anyany.png differ
diff --git a/Mohem/resources/ios/splash/Default~iphone.png b/Mohem/resources/ios/splash/Default~iphone.png
index cf88a988..3c81f3f3 100644
Binary files a/Mohem/resources/ios/splash/Default~iphone.png and b/Mohem/resources/ios/splash/Default~iphone.png differ
diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts
index d4a765a3..40dc3dd3 100644
--- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts
+++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts
@@ -15,13 +15,14 @@ import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attach
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
+import { HomeComponent } from "src/app/notification/home/home.component";
@Component({
selector: 'app-absence-confirm',
templateUrl: './absence-confirm.component.html',
styleUrls: ['./absence-confirm.component.scss']
})
export class AbsenceConfirmComponent implements OnInit {
- direction:string;
+ direction: string;
P_TransactionID: number;
approversList = [];
selEmp: string = '';
@@ -58,7 +59,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.P_TransactionID = this.common.sharedService.getSharedData(
AbsenceResponse.SHARED_DATA
);
- this.getPassNotificationDetails =this.common.sharedService.getSharedData(
+ this.getPassNotificationDetails = this.common.sharedService.getSharedData(
AbsenceNotificatonBodyResponse.NOT_WORKLIST,
true
);
@@ -89,7 +90,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.getApproversList();
}
- ngOnInit() {}
+ ngOnInit() { }
startAbApproval() {
if (this.attachListOver) {
//first call add attach inside success call submit
@@ -126,12 +127,12 @@ export class AbsenceConfirmComponent implements OnInit {
this.startAbsApprovalProcess();
} else {
//stope
- let filtered = this.attachListOver.filter(function(el) {
+ let filtered = this.attachListOver.filter(function (el) {
return el.isSuccess == true;
});
this.attachListOver = filtered;
let msg: string = '';
- // msg = this.translate.translate("addAttach.errorMsg");
+ // msg = this.translate.translate("addAttach.errorMsg");
//this.common.showAlert(msg);
}
}
@@ -168,11 +169,12 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.common.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitAbs==false){
- let msg: string = this.ts.trPK('general', 'messageSuccess');
- this.common.presentAlert(msg);
-
+ // let msg: string = this.ts.trPK('general', 'messageSuccess');
+ // this.common.presentAlert(msg);
+ this.common.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
+ this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
}
@@ -204,61 +206,61 @@ export class AbsenceConfirmComponent implements OnInit {
// });
const modal = await this.modalCtrl.create({
component: AbsenceAttachmentComponent,
- componentProps:{ indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID},
+ componentProps: { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID },
keyboardClose: true,
animated: false
- });
+ });
modal.onDidDismiss()
- .then((data) => {
- if (data == 'cancel' || data == 'undefined') {
- return;
- } else {
- if (!str) {
- this.updateFile(data, attachDocID);
+ .then((data) => {
+ if (data == 'cancel' || data == 'undefined') {
+ return;
} else {
- this.attachListDisplay = data.data;
- this.attachItems = this.attachListDisplay.map(function (el) {
- var o = Object.assign({}, el);
- o.isSuccess = false;
- return o;
- });
- this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
+ if (!str) {
+ this.updateFile(data, attachDocID);
+ } else {
+ this.attachListDisplay = data.data;
+ this.attachItems = this.attachListDisplay.map(function (el) {
+ var o = Object.assign({}, el);
+ o.isSuccess = false;
+ return o;
+ });
+ this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
+ }
}
- }
- });
+ });
return await modal.present();
}
-/*****submit modal********/
-async openSubmitModal() {
- this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList');
- this.common.sharedService.setSharedData(this.absComments, 'absComments');
- const modal = await this.modalCtrl.create({
- component: SubmitAbsenceModalComponent,
- backdropDismiss: false,
+ /*****submit modal********/
+ async openSubmitModal() {
+ this.common.sharedService.setSharedData(this.attachListOver, 'submitAbsAttachmentList');
+ this.common.sharedService.setSharedData(this.absComments, 'absComments');
+ const modal = await this.modalCtrl.create({
+ component: SubmitAbsenceModalComponent,
+ backdropDismiss: false,
- });
- modal.cssClass = 'note-modal';
+ });
+ modal.cssClass = 'note-modal';
- modal.onDidDismiss()
- .then((data) => {
- console.log(data.data);
+ modal.onDidDismiss()
+ .then((data) => {
+ console.log(data.data);
- if (data.data == 'cancel' || data.data == undefined) {
- return;
- } else {
- this.startAbApproval();
- }
- });
+ if (data.data == 'cancel' || data.data == undefined) {
+ return;
+ } else {
+ this.startAbApproval();
+ }
+ });
- return await modal.present();
+ return await modal.present();
-}
+ }
@@ -266,7 +268,7 @@ async openSubmitModal() {
removeFile(objectitem) {
-
+
if (this.attachListOver) {
let index2 = this.attachListOver.findIndex(item => item == objectitem);
if (index2 > -1) {
@@ -300,12 +302,12 @@ async openSubmitModal() {
} // valid it
}
- async OpenAttachFiles(value, Type) {
+ async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage');
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent
});
-
+
modal.onDidDismiss()
.then((data) => {
});
@@ -314,7 +316,7 @@ async openSubmitModal() {
}
updateFile(attachList, attachDocID) {
-
+
let req = {
P_ATTACHED_DOCUMENT_ID: attachDocID,
P_FILE_DATA: attachList[0].P_FILE_DATA,
@@ -327,7 +329,7 @@ async openSubmitModal() {
let msg: string = '';
// msg = this.translate.translate("addAttach.attachUpdate");
// this.common.showAlert(msg);
-
+
this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID);
}
} // val
@@ -345,7 +347,7 @@ async openSubmitModal() {
// });
}
continueDelete(attach) {
-
+
let req = {
P_ATTACHED_DOCUMENT_ID: attach.ATTACHED_DOCUMENT_ID
};
@@ -367,9 +369,9 @@ async openSubmitModal() {
- /*******************Add attchement Functions*************/
+ /*******************Add attchement Functions*************/
- public uploader: FileUploader = new FileUploader({
+ public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
@@ -386,7 +388,7 @@ async openSubmitModal() {
});
- onFileSelectedclick(event){
+ onFileSelectedclick(event) {
event.target.value = '';
}
@@ -430,7 +432,7 @@ async openSubmitModal() {
pushObject(fileData, name, type) {
- console.log('before push: '+ this.index);
+ console.log('before push: ' + this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
@@ -438,11 +440,11 @@ async openSubmitModal() {
this.attachListOver.push(
{
- AttachmentID: this.attachListOver.length,
+ AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
- P_TRANSACTION_ID: this.P_TransactionID
+ P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts
index a515c255..376cb601 100644
--- a/Mohem/src/app/app-routing.module.ts
+++ b/Mohem/src/app/app-routing.module.ts
@@ -8,6 +8,7 @@ const routes: Routes = [
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' },
@@ -29,7 +30,14 @@ const routes: Routes = [
{ path: 'sit', loadChildren: './sit/sit.module#SitPageModule' },
{ path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' },
{ path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' },
- { path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' }
+ { path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' },
+ { path: 'notification-center', loadChildren: './notification-center/notification-center.module#NotificationCenterPageModule' }
+
+
+
+
+
+
];
@NgModule({
diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html
index 39623535..6744e6de 100644
--- a/Mohem/src/app/app.component.html
+++ b/Mohem/src/app/app.component.html
@@ -54,9 +54,8 @@
-->
-
-
-
+
-
-
-
+
{{confirmMatchNew.text}}
diff --git a/Mohem/src/app/authentication/change-password/change-password.component.ts b/Mohem/src/app/authentication/change-password/change-password.component.ts
index 5df74099..4b2a9f6a 100644
--- a/Mohem/src/app/authentication/change-password/change-password.component.ts
+++ b/Mohem/src/app/authentication/change-password/change-password.component.ts
@@ -83,13 +83,13 @@ export class ChangePasswordComponent implements OnInit {
text: this.ts.trPK('login', 'repeating-password-validation'),
isMatch: false
};
- public isContainSpecialChar = {
- blankImg: '../assets/icon/blank.svg',
- greenImg: '../assets/icon/green.svg',
- redImg: '../assets/imgs/close.svg',
- text: this.ts.trPK('login', 'special-character-password-validation'),
- isMatch: false
- };
+ // public isContainSpecialChar = {
+ // blankImg: '../assets/icon/blank.svg',
+ // greenImg: '../assets/icon/green.svg',
+ // redImg: '../assets/imgs/close.svg',
+ // text: this.ts.trPK('login', 'special-character-password-validation'),
+ // isMatch: false
+ // };
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
@@ -176,8 +176,10 @@ export class ChangePasswordComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
- this.cs.toastPK("changePassword", "successChange");
+ this.cs.greenToastPK("changePassword", "successChange");
this.sharedData.setSharedData(false, Password.IS_EXPIRED_PSW);
+ // this.cs.sharedService.getSharedData( AuthenticationService.IMEI_USER_DATA);
+ localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openLogin();
}
});
@@ -198,8 +200,10 @@ export class ChangePasswordComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
+ localStorage.setItem('password', this.P_NEW_PASSWORD);
console.log(result);
- this.cs.toastPK("changePassword", "successChange");
+ this.cs.greenToastPK("changePassword", "successChange");
+ localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openHome();
}
});
@@ -254,8 +258,8 @@ export class ChangePasswordComponent implements OnInit {
return this.isMinLength.blankImg;
case 5:
return this.isRepeatedLetter.blankImg;
- case 6:
- return this.isContainSpecialChar.blankImg;
+ // case 6:
+ // return this.isContainSpecialChar.blankImg;
case 7:
return this.confirmMatchNew.blankImg;
case 8:
@@ -311,14 +315,14 @@ export class ChangePasswordComponent implements OnInit {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
}
- case 6:
- if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
- this.isContainSpecialChar.isMatch = true;
- return this.isContainSpecialChar.greenImg;
- } else {
- this.isContainSpecialChar.isMatch = false;
- return this.isContainSpecialChar.redImg;
- }
+ // case 6:
+ // if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
+ // this.isContainSpecialChar.isMatch = true;
+ // return this.isContainSpecialChar.greenImg;
+ // } else {
+ // this.isContainSpecialChar.isMatch = false;
+ // return this.isContainSpecialChar.redImg;
+ // }
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = false;
@@ -343,7 +347,7 @@ export class ChangePasswordComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLetterCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.NEW_PASSWORD
- && this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
+ && this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}
diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts
index 8e2758a0..5f837829 100644
--- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts
+++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts
@@ -439,7 +439,7 @@ export class ConfirmLoginComponent implements OnInit {
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language;
- request.P_PASSWORD = this.password;
+ request.P_PASSWORD = localStorage.getItem('password');
this.authService
.login(request, () => {
console.log('error here');
@@ -514,11 +514,12 @@ export class ConfirmLoginComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
- console.log('2');
+
console.log(result);
+
+ this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
- // this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
diff --git a/Mohem/src/app/authentication/forgot/forgot.component.html b/Mohem/src/app/authentication/forgot/forgot.component.html
index 0a535673..fc00d176 100644
--- a/Mohem/src/app/authentication/forgot/forgot.component.html
+++ b/Mohem/src/app/authentication/forgot/forgot.component.html
@@ -72,10 +72,10 @@
{{isRepeatedLetter.text}}
-
+
{{confirmMatchNew.text}}
diff --git a/Mohem/src/app/authentication/forgot/forgot.component.ts b/Mohem/src/app/authentication/forgot/forgot.component.ts
index 9d9133e3..51cc3e09 100644
--- a/Mohem/src/app/authentication/forgot/forgot.component.ts
+++ b/Mohem/src/app/authentication/forgot/forgot.component.ts
@@ -70,13 +70,13 @@ export class ForgotComponent implements OnInit {
text: this.ts.trPK('login', 'repeating-password-validation'),
isMatch: false
};
- public isContainSpecialChar = {
- blankImg: '../assets/icon/blank.svg',
- greenImg: '../assets/icon/green.svg',
- redImg: '../assets/imgs/close.svg',
- text: this.ts.trPK('login', 'special-character-password-validation'),
- isMatch: false
- };
+ // public isContainSpecialChar = {
+ // blankImg: '../assets/icon/blank.svg',
+ // greenImg: '../assets/icon/green.svg',
+ // redImg: '../assets/imgs/close.svg',
+ // text: this.ts.trPK('login', 'special-character-password-validation'),
+ // isMatch: false
+ // };
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
@@ -153,7 +153,8 @@ export class ForgotComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
- this.cs.toastPK('changePassword', 'successChange');
+ this.cs.greenToastPK("changePassword", "successChange");
+ localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openLogin();
}
});
@@ -175,8 +176,8 @@ export class ForgotComponent implements OnInit {
return this.isMinLength.blankImg;
case 5:
return this.isRepeatedLetter.blankImg;
- case 6:
- return this.isContainSpecialChar.blankImg;
+ // case 6:
+ // return this.isContainSpecialChar.blankImg;
case 7:
return this.confirmMatchNew.blankImg;
case 8:
@@ -232,14 +233,14 @@ export class ForgotComponent implements OnInit {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
}
- case 6:
- if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
- this.isContainSpecialChar.isMatch = true;
- return this.isContainSpecialChar.greenImg;
- } else {
- this.isContainSpecialChar.isMatch = false;
- return this.isContainSpecialChar.redImg;
- }
+ // case 6:
+ // if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
+ // this.isContainSpecialChar.isMatch = true;
+ // return this.isContainSpecialChar.greenImg;
+ // } else {
+ // this.isContainSpecialChar.isMatch = false;
+ // return this.isContainSpecialChar.redImg;
+ // }
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = false;
@@ -263,7 +264,7 @@ export class ForgotComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLetterCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.P_NEW_PASSWORD
- && this.P_Confirm_NEW_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
+ && this.P_Confirm_NEW_PASSWORD && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}
diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.scss b/Mohem/src/app/authentication/sms-page/sms-page.page.scss
index 986beeb9..3aec3b30 100644
--- a/Mohem/src/app/authentication/sms-page/sms-page.page.scss
+++ b/Mohem/src/app/authentication/sms-page/sms-page.page.scss
@@ -1,25 +1,26 @@
-.header-toolbar{
+.header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
-.btnBack{
+.btnBack {
background: transparent;
}
-ion-img{
+ion-img {
width: 180px;
height: 180px;
- background:transparent;
+ background: transparent;
}
-h1{
+h1 {
font-size: 28px !important;
}
-span{
+span {
font-weight: bold;
}
-.button-login{
+
+.button-login {
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
@@ -39,7 +40,7 @@ span{
display: block;
}
-.sms_code{
+.sms_code {
margin: 0px;
text-align: center;
}
@@ -57,12 +58,13 @@ ion-input {
transition: all .2s ease-in-out;
border-radius: 3px;
display: inline-block;
+
&:focus {
- border-color:var(--ion-color-secondary) !important;
- box-shadow: 0 0 5px var(--ion-color-secondary) !important inset;
+ border-color: var(--ion-color-secondary) !important;
+ box-shadow: 0 0 5px var(--ion-color-secondary) !important;
}
-
+
&::selection {
- background: transparent;
+ background: transparent;
}
- }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts
index 40ebb3cc..aa9bf3b6 100644
--- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts
+++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts
@@ -482,6 +482,7 @@ export class SmsPageComponent implements OnInit {
}
this.common.sharedService.setSharedData(result.MemberInformationList[0].PAYROLL_CODE, "projcet-code");
+ this.common.sharedService.setSharedData(result.BasicMemberInformation.P_LEGISLATION_CODE, "legislation-code");
this.activeType = this.common.setActiveTypeLogin(0);
@@ -594,89 +595,55 @@ export class SmsPageComponent implements OnInit {
onChange() {
-
// tslint:disable-next-line: only-arrow-functions
-
const filtered = this.smc_code.filter(function (el) {
-
if (el) {
-
return el;
-
}
-
});
if (filtered.length === 4 && !this.isAutoRead) {
-
this.checkVerificationCode();
-
}
-
}
- goToNextInput(e) {
- const key = e.which;
- const t = e.target;
- const sib = t.nextElementSibling;
+ goToNextInput(e) {
+ const key = e.which;
+ const t = e.target;
+ const sib = t.nextElementSibling;
const sibPre = t.previousElementSibling;
-
- if (key === undefined && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
-
-
+ if (key === undefined && e.target.value.length==4 && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
this.checkActivation(e.target.value, false);
-
-
-
}
if (key !== 9 && (key < 48 || key > 57)) {
-
if (key === 8 || key === 46) {
-
return true;
-
} else {
-
e.preventDefault();
-
return false;
-
}
-
}
-
-
if (key === 9) {
-
return true;
-
}
-
-
if (sib) {
-
if (e.target.value === '') {
-
sibPre.setFocus();
-
} else {
-
sib.setFocus();
-
}
-
}
-
}
+
}
diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.html b/Mohem/src/app/backend-integrations/announcement/announcement.component.html
index 7402c007..8ee0f724 100644
--- a/Mohem/src/app/backend-integrations/announcement/announcement.component.html
+++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.html
@@ -60,18 +60,18 @@
- {{detialData.title_EN}}
- {{detialData.date}}
+ {{detailData.title_EN}}
+ {{detailData.date}}
- {{detialData.title_AR}}
- {{detialData.date}}
+ {{detailData.title_AR}}
+ {{detailData.date}}
-
-
+
+
-
-
+
+
diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.scss b/Mohem/src/app/backend-integrations/announcement/announcement.component.scss
index 6e104364..8a030fb1 100644
--- a/Mohem/src/app/backend-integrations/announcement/announcement.component.scss
+++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.scss
@@ -5,6 +5,7 @@
margin-right: auto;
height: 190px;
}
+
.main-card-image {
width: 100%;
display: block;
@@ -13,6 +14,7 @@
position: absolute;
height: 100%;
}
+
.text-style {
margin: 5px;
}
@@ -21,19 +23,19 @@
// border: 1px solid lightgray;
// border-radius: 30px;
}
-.class-dev-open {
-}
+
+.class-dev-open {}
.class-item-open {
border: 1px solid lightgray;
border-radius: 30px;
height: 100px;
}
-.class-item-close {
-}
+
+.class-item-close {}
.image-item-en {
- padding-left: 5px;
+ padding: 5px;
width: 100px;
min-height: 100px;
border: 5px solid white;
@@ -42,8 +44,9 @@
border-right: 0px;
object-fit: cover;
}
+
.image-item-ar {
- padding-right: 5px;
+ padding: 5px;
width: 100px;
min-height: 100px;
border: 5px solid white;
@@ -66,11 +69,13 @@
opacity: 1;
padding-bottom: 5px;
}
+
.item-list-p-title {
font: normal normal medium 11px/16px Poppins;
letter-spacing: -0.44px;
color: #535353;
}
+
.item-list-date-title {
font: normal normal 600 10px/16px Poppins;
letter-spacing: -0.4px;
@@ -83,11 +88,13 @@
color: #ffffff;
white-space: break-spaces;
}
+
.item-list-first-p {
font: normal normal normal 12px/17px Poppins;
letter-spacing: -0.12px;
color: #ffffff;
}
+
.item-list-first-date {
text-align: left;
font: normal normal bold 8px/23px Poppins;
@@ -101,6 +108,7 @@
color: #2b353e;
margin-bottom: -34px;
}
+
.card-style-p {
font: normal normal medium 13px/18px Poppins;
letter-spacing: -0.52px;
@@ -118,21 +126,23 @@
position: relative;
min-height: 283px;
}
+
.main-card-item-list-style {
position: absolute;
bottom: 0px;
--background: transparent;
}
-.main-card-label-stle{
- margin: 0px;
- padding: 0px;
- width: 237px;
+
+.main-card-label-stle {
+ margin: 0px;
+ padding: 0px;
+ width: 237px;
}
-.main-card-label-style-all{
- padding: 0px;
- margin: 0px;
- width: 200px;
+.main-card-label-style-all {
+ padding: 0px;
+ margin: 0px;
+ width: 200px;
}
.item-native {
diff --git a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts
index 464b73af..8d0e6022 100644
--- a/Mohem/src/app/backend-integrations/announcement/announcement.component.ts
+++ b/Mohem/src/app/backend-integrations/announcement/announcement.component.ts
@@ -22,14 +22,15 @@ export class AnnouncementComponent implements OnInit {
public pageSize = 1;
public pageLength = 0;
public lengthCounter = 5;
- public detialData: {
- id: number,
- title_EN: string,
- title_AR: string,
- body_EN: string,
- body_AR: string,
- img?: string,
- date: Date};
+ public detailData: {
+ id: number,
+ title_EN: string,
+ title_AR: string,
+ body_EN: string,
+ body_AR: string,
+ img?: string,
+ date: Date
+ };
constructor(
public announcementService: AnnouncementService,
@@ -63,21 +64,21 @@ export class AnnouncementComponent implements OnInit {
this.common.stopLoading();
if (this.common.validResponse(result)) {
holdData = JSON.parse(result.Mohemm_ITG_ResponseItem);
- data = JSON.parse(holdData.result.data)[0];
+ data = holdData.result.data[0];
console.log(data);
- this.detialData = {
+ this.detailData = {
id: data.rowID,
- title_EN: data.Title_EN,
- title_AR: data.Title_AR,
- body_EN: data.Body_EN,
- body_AR: data.Body_AR,
+ title_EN: data.titleEn,
+ title_AR: data.titleAr,
+ body_EN: data.descriptionEn,
+ body_AR: data.descriptionAr,
date: data.created,
- img: data.Banner_Image
+ img: data.imageContent
};
element.isOpen = !element.isOpen;
// this.common.stopLoading();
}
- console.log(this.detialData);
+ console.log(this.detailData);
});
} else {
element.isOpen = false;
@@ -86,7 +87,7 @@ export class AnnouncementComponent implements OnInit {
}
- closeAnnouncement(item){
+ closeAnnouncement(item) {
item.isOpen = false;
}
@@ -97,24 +98,24 @@ export class AnnouncementComponent implements OnInit {
this.common.stopLoading();
if (this.common.validResponse(result)) {
holdData = JSON.parse(result.Mohemm_ITG_ResponseItem);
- this.listOfAnnouncement = JSON.parse(holdData.result.data);
+ this.listOfAnnouncement = holdData.result.data;
this.pageLength = this.listOfAnnouncement[0].TotalItems;
for (let i = 0; i < this.listOfAnnouncement.length; i++) {
- this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].Title_EN;
- this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].Title_AR;
- this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].EmailBody_EN;
- this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].EmailBody_AR;
+ this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].titleEn;
+ this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].titleAr;
+ this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].descriptionEn;
+ this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].descriptionAr;
this.arr[i] = {
id: this.listOfAnnouncement[i].rowID,
- title_EN: this.listOfAnnouncement[i].Title_EN,
- title_AR: this.listOfAnnouncement[i].Title_AR,
- body_EN: this.listOfAnnouncement[i].EmailBody_EN,
- body_AR: this.listOfAnnouncement[i].EmailBody_AR,
+ title_EN: this.listOfAnnouncement[i].titleEn,
+ title_AR: this.listOfAnnouncement[i].titleAr,
+ body_EN: this.listOfAnnouncement[i].descriptionEn,
+ body_AR: this.listOfAnnouncement[i].descriptionAr,
date: this.listOfAnnouncement[i].created,
- img: this.listOfAnnouncement[i].Banner_Image,
+ img: this.listOfAnnouncement[i].imageContent,
isopen: false
};
- if ( i < this.numberOfListLength){
+ if (i < this.numberOfListLength) {
this.announcementList.push(this.arr[i]);
}
this.arrList.push(this.arr[i]);
diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts
index 2bbef54a..9235b0d8 100644
--- a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts
+++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts
@@ -198,8 +198,9 @@ export class ConfirmAddCeiComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
- let msg: string = this.ts.trPK("eit", "approval-message-success");
- this.cs.presentAlert(msg);
+ // let msg: string = this.ts.trPK("eit", "approval-message-success");
+ // this.cs.presentAlert(msg);
+ this.cs.greenToastPK("eit", "approval-message-success")
this.cs.openNotificationPage();
}
}
diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
index 72cf9af1..35abae8a 100644
--- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
+++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
@@ -14,6 +14,7 @@ import { EitService } from '../services/eit.service';
import { AddEitResponse } from '../models/add.eit.response';
import { FileUploader } from 'ng2-file-upload';
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
+import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({
selector: 'app-confirm-add-eit',
@@ -62,7 +63,7 @@ export class ConfirmAddEitComponent implements OnInit {
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
direction: string;
-
+
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.direction = TranslatorService.getCurrentLanguageName()
this.isSubmitBtnClicked = false;
@@ -81,8 +82,8 @@ export class ConfirmAddEitComponent implements OnInit {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true);
- // let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
-
+ // let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
+
this.itemKey = this.getPassNotificationDetails.ITEM_KEY;
this.pActionMode = "RESUBMIT";
this.menuType = "E";
@@ -228,12 +229,15 @@ export class ConfirmAddEitComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitEIT==false){
- let msg: string = this.ts.trPK("eit", "approval-message-success");
- this.cs.presentAlert(msg);
+ // let msg: string = this.ts.trPK("eit", "approval-message-success");
+ // this.cs.presentAlert(msg);
+ this.cs.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
// this.cs.openHome();
+ this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
+ //this.cs.setTotalNumberOfWorklistRequest(true);
this.cs.openNotificationPage();
}
}
@@ -249,7 +253,7 @@ export class ConfirmAddEitComponent implements OnInit {
//open the modal with return data
let attachDocID = attachItems.ATTACHED_DOCUMENT_ID;
- this.cs.sharedService.setSharedData( this.P_TransactionID, 'TransactionID');
+ this.cs.sharedService.setSharedData(this.P_TransactionID, 'TransactionID');
this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
const modal = await this.modalController.create({
@@ -298,7 +302,7 @@ export class ConfirmAddEitComponent implements OnInit {
/*****submit modal********/
async openSubmitModal() {
- this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
+ this.cs.sharedService.setSharedData(this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
const modal = await this.modalController.create({
component: SubmitEitModalComponent,
@@ -314,7 +318,7 @@ export class ConfirmAddEitComponent implements OnInit {
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
- this.startEitApproval();
+ this.startEitApproval();
}
});
@@ -482,7 +486,7 @@ export class ConfirmAddEitComponent implements OnInit {
});
- onFileSelectedclick(event){
+ onFileSelectedclick(event) {
event.target.value = '';
}
@@ -529,7 +533,7 @@ export class ConfirmAddEitComponent implements OnInit {
pushObject(fileData, name, type) {
- console.log("before push: "+ this.index);
+ console.log("before push: " + this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
@@ -537,11 +541,11 @@ export class ConfirmAddEitComponent implements OnInit {
this.attachListOver.push(
{
- AttachmentID: this.attachListOver.length,
+ AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
- P_TRANSACTION_ID: this.P_TransactionID
+ P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts
index a8948b72..2b8da3ac 100644
--- a/Mohem/src/app/hmg-common/hmg-common.module.ts
+++ b/Mohem/src/app/hmg-common/hmg-common.module.ts
@@ -277,7 +277,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
AttendanceOptionsComponent,
CardCalendarComponent,
SubmitAddressModalComponent,
- SanitizeHtmlPipe
+ SanitizeHtmlPipe,
],
providers: [
AttendScanService,
diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts
index e0b802bc..7ad441c2 100644
--- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts
@@ -134,6 +134,9 @@ export class AuthenticationService {
public setPublicFields(request: Request): Request {
const isAndroid = this.platform.is('android');
const isIOS = this.platform.is('ios');
+ // const userData = this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
+ const userPayrollCode = this.cs.sharedService.getSharedData("projcet-code", false);
+ const userLegislationCode = this.cs.sharedService.getSharedData("legislation-code", false);
let mobileType = '';
if (isAndroid) {
mobileType = 'android';
@@ -142,11 +145,18 @@ export class AuthenticationService {
} else {
mobileType = 'android';
}
- request.VersionID = 3.9;
+ request.VersionID = 3.8;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;
+ if (userPayrollCode) {
+ request.PayrollCodeStr = userPayrollCode;
+ }
+ if (userLegislationCode) {
+ request.LegislationCodeStr = userLegislationCode
+ }
+
return request;
}
public authenticateAndSetPersonalInformation(
@@ -485,7 +495,7 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.activationCodeURL, request, onError, errorLabel);
}
- public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string, fromSMS = false )
+ public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string, fromSMS = false)
: Observable {
this.setPublicFields(request);
return this.con.post(AuthenticationService.smsCheck, request, onError, errorLabel, fromSMS);
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts
index 387a7d73..68ca3ab7 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts
@@ -3,6 +3,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { AuthenticatedUser } from './authenticated-user';
import { PrivilageModel } from './privilage-model';
export class SMSCheckResponse extends Response {
+ BasicMemberInformation: any = {};
AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[];
Privilege_List:PrivilageModel[];
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 2167a69d..406694d2 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -85,7 +85,8 @@ export class CommonService {
'POAPPRV': 0,
'INVITEM': 0,
"STAMP": 0,
- 'ITG': 0
+ 'ITG': 0,
+ 'COC': 0
}
private progressLoaders: any[] = [];
@@ -1372,6 +1373,10 @@ export class CommonService {
this.nav.navigateForward(['/reports/transaction-list']);
}
+ public openConcurrentTransactionsHome() {
+
+ this.nav.navigateForward(['/reports/transactions']);
+ }
public openTermination() {
this.nav.navigateForward(['/termination/termination-form']);
@@ -1440,7 +1445,9 @@ export class CommonService {
public openLogin() {
this.nav.navigateRoot(['/authentication/login']);
}
-
+ public openNotificationCenter() {
+ this.nav.navigateRoot(['/notification-center']);
+ }
public openUserForgot() {
this.nav.navigateForward(['/authentication/checkuser']);
}
@@ -1599,7 +1606,7 @@ export class CommonService {
public totalCounter = 0;
getTotalNumberOfWorklistRequest() {
this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false));
- return this.totalCounter;
+ return this.totalCounter ? this.totalCounter : 0;
}
setTotalNumberOfWorklistRequest() {
if (this.totalCounter > 0) {
@@ -1643,17 +1650,57 @@ export class CommonService {
key: 'POAPPRV',
disable: false,
total: 0
- }
+ },
+ // {
+ // value: 0,
+ // name: 'ITG',
+ // active: false,
+ // color: '#cc3232',
+ // key: 'ITG',
+ // disable: false,
+ // total: 0
+ // },
+ // {
+ // value: 0,
+ // name: 'IC',
+ // active: false,
+ // color: '#9e7e97',
+ // key: 'INVITEM',
+ // disable: false,
+ // total: 0
+ // },
+ // {
+ // value: 0,
+ // name: 'STAMP',
+ // active: false,
+ // color: '#ff9800',
+ // key: 'STAMP',
+ // disable: false,
+ // total: 0,
+ // },
+ // {
+ // value: 0,
+ // name: 'COC',
+ // active: false,
+ // color: '#787299',
+ // key: 'COC',
+ // disable: true,
+ // total: 0,
+ // }
];
public data = {
datasets: [
{
- data: [0, 0, 0, 0, 0],
+ data: [0, 0, 0, 0, 0, 0, 0, 0],
backgroundColor: [
'#18a169',
'#114475',
- '#38c9b3'
+ '#38c9b3',
+ '#cc3232',
+ '#9e7e97',
+ '#ff9800',
+ '#787299'
],
borderWidth: 6
}]
@@ -1671,6 +1718,8 @@ export class CommonService {
this.filters[2].value = this.filterKeys['POAPPRV'];
this.data.datasets[0].data[2] = this.filterKeys['POAPPRV'];
+ // this.filters[7].value = this.filterKeys['COC'];
+ // this.data.datasets[0].data[7] = this.filterKeys['COC'];
let val = { 'filters': [], 'data': {} };
val.filters = this.filters;
diff --git a/Mohem/src/app/hmg-common/services/models/request.ts b/Mohem/src/app/hmg-common/services/models/request.ts
index 1a9e8fd2..6a16ec13 100644
--- a/Mohem/src/app/hmg-common/services/models/request.ts
+++ b/Mohem/src/app/hmg-common/services/models/request.ts
@@ -18,6 +18,8 @@ export class Request {
public P_MOBILE_NUMBER: string;
public P_EMAIL_ADDRESS: string;
public P_NOTIFICATION_ID: number;
+ public PayrollCodeStr: string;
+ public LegislationCodeStr: string;
// public P_LEGISLATION_CODE: string;
// public OTP_SendType: number;
diff --git a/Mohem/src/app/hmg-common/services/push/push.service.ts b/Mohem/src/app/hmg-common/services/push/push.service.ts
index 4ed1f3ae..92682892 100644
--- a/Mohem/src/app/hmg-common/services/push/push.service.ts
+++ b/Mohem/src/app/hmg-common/services/push/push.service.ts
@@ -40,13 +40,13 @@ export class PushService {
this.firebasex.grantPermission().then(hasPermission => {
console.log("Permission was " + (hasPermission ? "granted" : "denied"));
this.processStartReceivingWithFirebase();
- });
+ });
} else {
this.processStartReceivingWithFirebase();
}
- });
- }
-
+ });
+ }
+
private processNotification(data: any) {
const notification = new NotificationModel();
@@ -67,7 +67,7 @@ export class PushService {
this.sharedService.setSharedData(notification, NotificationModel.SHARED_DATA);
} else if (type === NotificationModel.TYPE_CONFERENCE) {
const session = data.additionalData.sessionId;
- this.sharedService.setSharedData( new SessionModel(session) , SessionModel.SHARED_DATA);
+ this.sharedService.setSharedData(new SessionModel(session), SessionModel.SHARED_DATA);
} else {
if (type === NotificationModel.TYPE_VIDEO) {
notification.MessageType = 'video';
@@ -87,7 +87,7 @@ export class PushService {
}
private registerInBackend(data: any) {
- console.log('firebasex Token ID: ' + data);
+ console.log('firebasex Token ID: ' + data);
if (data) {
this.cs.sharedService.setSharedData(data, AuthenticationService.DEVICE_TOKEN);
localStorage.setItem('deviceToken', data);
@@ -101,11 +101,11 @@ export class PushService {
request.DeviceToken = deviceToken;
request.DeviceType = this.getDeviceType();
const user = this.authService.getAuthenticatedUser();
- // request.PatientMobileNumber = user.MobileNo;
+ // request.PatientMobileNumber = user.MobileNo;
// request.NationalID = user.IdentificationNo;
request.Gender = user.Gender;
request.PatientID = user.PatientID;
- // request.PatientOutSA = user.PatientOutSA ? 1 : 0;
+ // request.PatientOutSA = user.PatientOutSA ? 1 : 0;
// request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id
request.MACAddress = '00:00:00:00:00:00';
return this.con.postNoLoad(PushService.loggedInUserURL, request
@@ -138,12 +138,24 @@ export class PushService {
private processStartReceivingWithFirebase() {
console.log("processStartReceivingWithFirebase");
this.firebasex.getToken().then(token => {
- // alert("token: "+ token);
+ // alert("token: "+ token);
this.cs.sharedService.setSharedData(token, "new-device-token");
localStorage.setItem('deviceToken', token);
this.cs.setDeviceToken(token); //last way to set the device Token to get it through getDeviceToken
this.registerInBackend(token);
}).catch(error => console.error('Error getting token', error));
+
+ this.firebasex.onMessageReceived().subscribe(data => {
+ console.log("onMessageReceived");
+ console.log(data);
+ this.firebasex.clearAllNotifications();
+ if (data.notification_type == 3) {
+ this.cs.sharedService.setSharedData(data, NotificationModel.SHARED_DATA);
+ this.cs.openNotificationCenter();
+ }
+
+ });
+
}
public onPushReceived(payload: any) {
diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss
index 0663997a..6895ceb4 100644
--- a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss
+++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss
@@ -53,3 +53,13 @@
width: 100px;
height: 70px;
}
+
+.loader {
+ position: absolute;
+ width: 100%;
+ top: 70px;
+ left: 2px;
+ img {
+ width: 25px;
+ }
+}
diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html
index 21cee860..2f3a71b4 100644
--- a/Mohem/src/app/home/home.page.html
+++ b/Mohem/src/app/home/home.page.html
@@ -10,6 +10,9 @@
+
{
+ this.showLoader = false;
+ this.common.stopLoading();
});
}
ITGCountAllNotification() {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
- this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
- this.common.filterKeys['ITG'] = result.TotalCount;
- this.statsButtons[1].statsValue =
- Math.floor(this.countAllNotification + result.TotalCount);
+ if (this.common.validResponse(result)) {
+ this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
+ this.common.filterKeys['ITG'] = result.TotalCount;
+ this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount);
+ this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
+ this.getCOCNotificationCount();
+ this.common.stopLoading();
+ } else {
+ this.showLoader = false;
+ this.common.stopLoading();
+ }
+ }, (error) => {
+ this.showLoader = false;
+ this.common.stopLoading();
+ });
+ }
+
+ getCOCNotificationCount() {
+ const request = new COCRequest();
+ request.ItgPageSize = 1;
+ request.ItgPageNo = 1;
+ request.Date = moment(new Date()).format("YYYY-MM-DD");
+
+ this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
+ console.log(result);
+ if (this.common.validResponse(result)) {
+ const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
+ const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
+ this.common.filterKeys['COC'] = totalCount;
+
+
+ this.statsButtons[1].statsValue = Math.floor(this.statsButtons[1].statsValue + totalCount);
+
+ this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
+
+ this.showLoader = false;
+ this.common.stopLoading();
+ } else {
+ this.showLoader = false;
+ this.common.stopLoading();
+ }
+
+
+ }, (error) => {
+ this.showLoader = false;
this.common.stopLoading();
});
}
diff --git a/Mohem/src/app/itemforsale/filter/filter.component.html b/Mohem/src/app/itemforsale/filter/filter.component.html
index 4b1df28c..0e0d674c 100644
--- a/Mohem/src/app/itemforsale/filter/filter.component.html
+++ b/Mohem/src/app/itemforsale/filter/filter.component.html
@@ -4,9 +4,7 @@
navigate="false"
backlink="false"
[headerText]="'general,filter-offers' | translate">
-
-
-
+
0">
@@ -15,14 +13,12 @@
{{key.title}}
- {{key.title_ar}}
+ {{key.title_Ar}}
-
-
diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts
index bdff62ff..10fc21bf 100644
--- a/Mohem/src/app/itemforsale/home/home.component.ts
+++ b/Mohem/src/app/itemforsale/home/home.component.ts
@@ -301,15 +301,6 @@ export class HomeComponent implements OnInit {
return { AttachmentID: this.indexLastObj, FileName: res.name, Base64Data: res.data.split(",")[1], ContentType: 'image/' + attachType };
});
-
-
-
-
-
-
-
-
-
} catch (e) { }
}
}
diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss
index d46e0e37..6522a170 100644
--- a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss
+++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss
@@ -526,4 +526,7 @@ select option[data-default] {
.button-native {
box-shadow: none!important;
+ }
+ .gridAH{
+ text-align: justify;
}
\ No newline at end of file
diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts
index 48cc75d0..1ec8c7ed 100644
--- a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts
+++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts
@@ -54,9 +54,9 @@ export class HrRequestFormComponent implements OnInit {
public sectionDep: any;
public projectCode;
public SelectedServiceType: any;
- public depType: any ="";
- public secType: any ="";
- public topicType: any ="";
+ public depType: any = "";
+ public secType: any = "";
+ public topicType: any = "";
indexLastObj: any;
addAttachRequest: any = [];
TransactionID: any;
@@ -73,17 +73,17 @@ export class HrRequestFormComponent implements OnInit {
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
];
- projctid:any;
- employeeNumber:any;
- ticketType: any =[];
+ projctid: any;
+ employeeNumber: any;
+ ticketType: any = [];
public direction: string;
HRServices = '';
- Complaints='';
- Inquiry='';
- input = document.getElementById ("firstLabel");
-
-
-
+ Complaints = '';
+ Inquiry = '';
+ input = document.getElementById("firstLabel");
+
+
+
constructor(
public ts: TranslatorService,
public cs: CommonService,
@@ -100,20 +100,20 @@ export class HrRequestFormComponent implements OnInit {
}
ngOnInit() {
- this.projectCode = this.cs.sharedService.getSharedData("projcet-code",false);
+ this.projectCode = this.cs.sharedService.getSharedData("projcet-code", false);
this.getTicketTypes();
this.getProject();
-
+
}
-
+
public isValidForm(): boolean {
if (this.depType && this.SelectedServiceType && this.secType && this.topicType) {
- return false;
+ return false;
}
return true;
-}
+ }
onSelectChange(event, type) {
@@ -121,20 +121,20 @@ export class HrRequestFormComponent implements OnInit {
console.log(value);
// this.topicTypeList =[];
// this.sectionTypeList =[];
- if(type==1){
+ if (type == 1) {
this.depType = value;
- this.sectionTypeList =[];
- this.topicTypeList =[];
+ this.sectionTypeList = [];
+ this.topicTypeList = [];
this.getDepartmentSections(value);
-
- }else if(type==2){
+
+ } else if (type == 2) {
this.getSectionTopics(value);
- this.topicTypeList =[];
+ this.topicTypeList = [];
}
-
- }
- onFileSelectedclick(event){
+ }
+
+ onFileSelectedclick(event) {
event.target.value = '';
}
@@ -158,8 +158,8 @@ export class HrRequestFormComponent implements OnInit {
})
}
handlegetTicketTypesResult(result) {
- this.ticketType =result.Mohemm_Itg_TicketTypesList;
-
+ this.ticketType = result.Mohemm_Itg_TicketTypesList;
+
}
/////////////////////////////////////////////////
@@ -177,11 +177,11 @@ export class HrRequestFormComponent implements OnInit {
}
handlegetProjectResult(result) {
this.Projectresult = result.Mohemm_Itg_ProjectsList;
- this.projctid=this.Projectresult[0].projectId;
+ this.projctid = this.Projectresult[0].projectId;
this.getProjectDepartments();
}
-////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////
getProjectDepartments() {
const request = {
EmployeeNumber: "",
@@ -204,7 +204,7 @@ export class HrRequestFormComponent implements OnInit {
getDepartmentSections(value) {
const request = {
EmployeeNumber: "",
- ItgProjectDepartmentId: value ?value : this.departTypeList.projectDepartmentId,
+ ItgProjectDepartmentId: value ? value : this.departTypeList.projectDepartmentId,
};
@@ -218,11 +218,11 @@ export class HrRequestFormComponent implements OnInit {
// this.getSectionTopics();
}
- getSectionTopics(value=null) {
+ getSectionTopics(value = null) {
const request = {
EmployeeNumber: "",
// ItgDepartmentSectionId: this.sectionTypeList.departmentSectionId,
- ItgDepartmentSectionId: value ?value : this.sectionTypeList.departmentSectionId,
+ ItgDepartmentSectionId: value ? value : this.sectionTypeList.departmentSectionId,
};
this.MowadhafiService.getSectionTopics(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
@@ -238,41 +238,57 @@ export class HrRequestFormComponent implements OnInit {
}
- /*******************Create Ticket Function*************/
+ /*******************Create Ticket Function*************/
CreateTicket() {
-
- var authUser =this.authService.getAuthenticatedRequest();
+
+ var authUser = this.authService.getAuthenticatedRequest();
this.cs.startLoading();
- var request = new FormData();
- request.append('ticketTypeId', this.SelectedServiceType);
- request.append('projectId', this.projctid);
- request.append('departmentId', this.depType);
- request.append('sectionId', this.secType);
- request.append('sectionTopicId', this.topicType);
- request.append('description', this.Description);
- console.log("TEST:______")
- console.log(this.selectedFile);
- if(this.selectedFile && this.selectedFile !== undefined){
- request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
- }
- request.append('employeeNumber', authUser.P_USER_NAME);
- request.append('ticketStatus', 'new');
- request.append('channelId', '3');
- request.append('Channel', authUser.Channel.toString());
- request.append('LogInToken', authUser.LogInTokenID);
- request.append('Token', authUser.TokenID);
- request.append('EmployeeNumber', authUser.P_USER_NAME);
- request.append('MobileNo', authUser.MobileNumber);
+ // var request = new FormData();
+ // request.append('ticketTypeId', this.SelectedServiceType);
+ // request.append('projectId', this.projctid);
+ // request.append('departmentId', this.depType);
+ // request.append('sectionId', this.secType);
+ // request.append('sectionTopicId', this.topicType);
+ // request.append('description', this.Description);
+
+ // if(this.selectedFile && this.selectedFile !== undefined){
+ // request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
+ // }
+ // request.append('employeeNumber', authUser.P_USER_NAME);
+ // request.append('ticketStatus', 'new');
+ // request.append('channelId', '3');
+ // request.append('Channel', authUser.Channel.toString());
+ // request.append('LogInToken', authUser.LogInTokenID);
+ // request.append('Token', authUser.TokenID);
+ // request.append('EmployeeNumber', authUser.P_USER_NAME);
+ // request.append('MobileNo', authUser.MobileNumber);
+
+ var request = {
+ "TokenID": authUser.LogInTokenID, "EmployeeNumber": authUser.P_USER_NAME, "ItgImageCollList": this.addAttachRequest,
+ "ticketTypeId": this.SelectedServiceType,
+ "projectId": this.projctid,
+ "departmentId": this.depType,
+ "sectionId": this.secType,
+ "sectionTopicId": this.topicType,
+ "description": this.Description,
+ "employeeNumber": authUser.P_USER_NAME,
+ "ticketStatus": "new",
+ "channelId": 3,
+ "Channel": authUser.Channel.toString(),
+ "LogInToken": authUser.LogInTokenID,
+ "Token": authUser.TokenID,
+ "MobileNo": authUser.MobileNumber,
+ }
this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
- if(this.cs.validResponse(result)){
+ if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.checkERM('After Service Submission');
this.cs.greenToastPK("general", "success-create");
this.cs.openMyRequestPage();
- }else{
+ } else {
this.cs.stopLoading();
this.cs.redToastPK("general", "try-again");
}
@@ -329,7 +345,7 @@ export class HrRequestFormComponent implements OnInit {
else {
const file = input.target.files[0];
this.selectedFile = input.target.files;
-
+
this.getBase64(file).then(data =>
this.pushObject(data, file.name, file.type)
@@ -348,18 +364,21 @@ export class HrRequestFormComponent implements OnInit {
}
pushObject(fileData, name, type) {
-
+
this.indexLastObj++;
try {
let array = name.split(".");
let attachType: string = array[array.length - 1];
this.addAttachRequest.push({
- AttachmentID: this.indexLastObj,
- P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1],
- P_FILE_DATA: fileData.split(",")[1],
- P_FILE_NAME: name, //.split('.')[0],
- P_TRANSACTION_ID: this.TransactionID
+ // AttachmentID: this.indexLastObj,
+ // P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1],
+ // P_FILE_DATA: fileData.split(",")[1],
+ // P_FILE_NAME: name, //.split('.')[0],
+ // P_TRANSACTION_ID: this.TransactionID
+ Base64Data: fileData.split(",")[1],
+ FileName: name,
+ ContentType: 'image/' + attachType
});
} catch (e) { }
}
diff --git a/Mohem/src/app/mowadhafi/mowadhafi.service.ts b/Mohem/src/app/mowadhafi/mowadhafi.service.ts
index 8976393b..2a34d1d8 100644
--- a/Mohem/src/app/mowadhafi/mowadhafi.service.ts
+++ b/Mohem/src/app/mowadhafi/mowadhafi.service.ts
@@ -19,7 +19,7 @@ export class MowadhafiService {
public static getTicketStatisticsByEmp = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee';
public static getTicketTransaction = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction';
public static getTicketDetails = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails';
- public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicket';
+ public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicketMobile';
constructor(
public con: ConnectorService,
@@ -108,16 +108,17 @@ export class MowadhafiService {
const request = absence;
this.authService.authenticateRequest(request);
request.employeeNumber = request.P_USER_NAME;
- const HttpUploadOptions = {
- headers: new HttpHeaders({ "Content-Type": "multipart/form-data", })
- }
+ return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel);
+ // const HttpUploadOptions = {
+ // headers: new HttpHeaders({ "Content-Type": "multipart/form-data", })
+ // }
// return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel);
- return this.http.post(ConnectorService.host + MowadhafiService.getCreateTicket, absence, {
- // reportProgress: true,
- // observe: 'events'
- }
- )
+ //return this.http.post(ConnectorService.host + MowadhafiService.getCreateTicket, absence, {
+ // reportProgress: true,
+ // observe: 'events'
+ //}
+ // )
}
}
\ No newline at end of file
diff --git a/Mohem/src/app/my-team/home/home.component.html b/Mohem/src/app/my-team/home/home.component.html
index 4e0d6b8e..fb9a73ad 100644
--- a/Mohem/src/app/my-team/home/home.component.html
+++ b/Mohem/src/app/my-team/home/home.component.html
@@ -1,6 +1,5 @@
diff --git a/Mohem/src/app/notification-center/notification-center.module.ts b/Mohem/src/app/notification-center/notification-center.module.ts
new file mode 100644
index 00000000..cadf43b2
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-center.module.ts
@@ -0,0 +1,29 @@
+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 { NotificationCenterPage } from './notification-center.page';
+import { DetailComponent } from './notification-detail/detail.component';
+import { HmgCommonModule } from '../hmg-common/hmg-common.module';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: DetailComponent
+ }
+];
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FormsModule,
+ IonicModule,
+ HmgCommonModule,
+ RouterModule.forChild(routes)
+ ],
+ declarations: [NotificationCenterPage, DetailComponent]
+})
+export class NotificationCenterPageModule { }
diff --git a/Mohem/src/app/notification-center/notification-center.page.html b/Mohem/src/app/notification-center/notification-center.page.html
new file mode 100644
index 00000000..7da442b0
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-center.page.html
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/notification-center/notification-center.page.scss b/Mohem/src/app/notification-center/notification-center.page.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/Mohem/src/app/notification-center/notification-center.page.spec.ts b/Mohem/src/app/notification-center/notification-center.page.spec.ts
new file mode 100644
index 00000000..f21e182e
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-center.page.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { NotificationCenterPage } from './notification-center.page';
+
+describe('NotificationCenterPage', () => {
+ let component: NotificationCenterPage;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ NotificationCenterPage ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(NotificationCenterPage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/notification-center/notification-center.page.ts b/Mohem/src/app/notification-center/notification-center.page.ts
new file mode 100644
index 00000000..9fb934cd
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-center.page.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-notification-center',
+ templateUrl: './notification-center.page.html',
+ styleUrls: ['./notification-center.page.scss'],
+})
+export class NotificationCenterPage implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.html b/Mohem/src/app/notification-center/notification-detail/detail.component.html
new file mode 100644
index 00000000..649ad4ea
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-detail/detail.component.html
@@ -0,0 +1,21 @@
+
+
+
+
+

+
+
+
+
+ {{data.image_Text}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.scss b/Mohem/src/app/notification-center/notification-detail/detail.component.scss
new file mode 100644
index 00000000..c8951127
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-detail/detail.component.scss
@@ -0,0 +1,84 @@
+.vertical_space {
+ height: 0.5cm;
+ width: 100%;
+}
+
+.title {
+ font-size: 0.38cm;
+ font-weight: bold;
+}
+
+.info-icon ion-icon {
+ font-size: 90px;
+ margin: 10px auto;
+ display: block;
+ margin-bottom: 0;
+ color: var(--ion-color-danger);
+}
+
+.info-icon h1 {
+ margin: auto;
+ font-size: 22px;
+ text-align: center;
+ margin-top: 10%;
+}
+
+.info-icon {
+ padding: 20px;
+ background: #fff;
+ margin: 20px;
+ margin-top: 15%;
+ border-radius: 15px;
+}
+
+.info-icon .line {
+ width: 100%;
+ height: 1px;
+ background: #ccddcc;
+ margin: 15px auto;
+}
+
+.info-icon .instruction p {
+ display: block;
+ margin: 0px;
+ margin-top: 7%;
+ color: #000;
+ text-align: center;
+}
+
+.info-icon b {
+ bottom: 11px;
+ margin: 18px;
+ color: var(--ion-color-danger);
+}
+
+.instruction b {
+ color: var(--ion-color-danger);
+ font-weight: bolder;
+}
+
+.stop-icon {
+ display: flex;
+ margin: 10px auto;
+ width: 45%;
+ margin-top: 40px;
+}
+
+p.otherwise {
+ font-size: 20px !important;
+}
+
+.close-icon {
+ position: relative;
+ height: 60px;
+ padding: 10px;
+}
+
+.close-icon img {
+
+ height: 35px;
+ width: 35px;
+ right: 0;
+ position: absolute;
+
+}
\ No newline at end of file
diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts b/Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts
new file mode 100644
index 00000000..149b9be7
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-detail/detail.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DetailComponent } from './detail.component';
+
+describe('DetailComponent', () => {
+ let component: DetailComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ DetailComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DetailComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/notification-center/notification-detail/detail.component.ts b/Mohem/src/app/notification-center/notification-detail/detail.component.ts
new file mode 100644
index 00000000..37306ae2
--- /dev/null
+++ b/Mohem/src/app/notification-center/notification-detail/detail.component.ts
@@ -0,0 +1,42 @@
+import { Component, OnInit } from '@angular/core';
+import { NotificationModel } from 'src/app/hmg-common/services/push/models/notification.model';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+// import { NotificationsCenterService } from '../service/notifications-center.service';
+import { Route, Router, ActivatedRoute, ActivationEnd } from '@angular/router';
+import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
+
+@Component({
+ selector: 'app-detail',
+ templateUrl: './detail.component.html',
+ styleUrls: ['./detail.component.scss']
+})
+export class DetailComponent implements OnInit {
+
+ public notification: NotificationModel;
+ public video_link: string;
+ public trustedVideoUrl: SafeResourceUrl;
+ public direction: any;
+ public data: any;
+ constructor(
+ public cs: CommonService,
+ public ts: TranslatorService,
+ public sharedData: SharedDataService,
+ // public notifyService: NotificationsCenterService,
+ public router: Router,
+ private domSanitizer: DomSanitizer,
+ public route: ActivatedRoute
+ ) {
+
+ }
+
+ ngOnInit() {
+ this.direction = TranslatorService.getCurrentDirection();
+
+ this.data = this.sharedData.getSharedData(NotificationModel.SHARED_DATA, true);
+ }
+ backLogin() {
+ this.cs.openLogin();
+ }
+}
diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html
index 43a8fa5b..d7234e77 100644
--- a/Mohem/src/app/notification/home/home.component.html
+++ b/Mohem/src/app/notification/home/home.component.html
@@ -100,8 +100,8 @@
-
-
+
+ = 25">
diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts
index 11657c30..de11c211 100644
--- a/Mohem/src/app/notification/home/home.component.ts
+++ b/Mohem/src/app/notification/home/home.component.ts
@@ -12,6 +12,7 @@ import { DatePipe } from '@angular/common';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
+import { COCRequest } from '../models/COCRequest';
@Component({
selector: 'app-home',
@@ -77,6 +78,7 @@ export class HomeComponent implements OnInit {
public totalPR = 0;
public totalIC = 0;
public totalStamp = 0;
+ public worklistLength = 0;
public showChart = false;
@@ -190,7 +192,12 @@ export class HomeComponent implements OnInit {
this.resetData();
this.direction = TranslatorService.getCurrentLanguageName();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
- this.openNotificationsDashboard();
+
+ var isWorklistChanged = this.common.sharedService.getSharedData(HomeComponent.COUNT_CHANGED);
+ if (isWorklistChanged) {
+ this.openNotificationsDashboard()
+ }
+ this.openNotificationsDashboardLocal();
}
}
@@ -198,28 +205,10 @@ export class HomeComponent implements OnInit {
this.getAllPushNotificationFun();
}
- openNotificationsDashboard() {
- // if (this.countChanged) {
-
- // this.DS.getOpenNotifications('', '', this.isPostNoLoad).subscribe((result: GetOpenNotificationsResponse) => {
- // if (this.common.validResponse(result)) {
- // this.countChanged = false;
- // this.worklistNotifications = result;
- // this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
- //this.resetFiltersUI();
- // this.assignDataToFilters();
- // this.common.sharedService.setSharedData(result, 'worklistNotifications');
+ openNotificationsDashboardLocal() {
// this.Details();
this.callWorkListServices();
- // }
- // });
- // } else {
- // this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
- // this.resetFiltersUI();
- // this.assignDataToFilters();
- // this.Details();
- // this.callWorkListServices();
- // }
+
}
assignDataToFilters() {
@@ -278,7 +267,7 @@ export class HomeComponent implements OnInit {
}
activeFilter(index: number) {
- if (index !== this.currentActiveIndex) {
+ if (index !== this.currentActiveIndex && index !== 7) {
if (index !== 4) {
this.common.startLoading();
}
@@ -389,6 +378,7 @@ export class HomeComponent implements OnInit {
}
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) {
+ this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList);
}
}
@@ -553,6 +543,7 @@ export class HomeComponent implements OnInit {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) {
+ this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList);
}
});
@@ -603,30 +594,10 @@ export class HomeComponent implements OnInit {
}
Details() {
- // var result = this.common.sharedService.getSharedData(MenuResponse.ITG_COUNTS, false);
- // if (this.countChanged) {
- // this.workListService.getITGDetails('', '', this.isPostNoLoad)
- // .subscribe((result: any) => {
- // this.countChanged = false;
- // this.ITGCount = result.TotalCount;
- // // this.totalRequestCount = this.totalRequestCount + result.TotalCount;
- // this.data.datasets[0].data[4] = this.ITGCount;
- // this.filters[4].value = result.TotalCount;
- // this.receivedITGCount = true;
- // })
- // } else {
-
- //this.workListService.getITGDetails('', '', this.isPostNoLoad)
- //.subscribe((result: any) => {
this.ITGCount = this.common.filterKeys['ITG'];//result.TotalCount;
- // this.totalRequestCount = this.totalRequestCount + result.TotalCount;
- this.data.datasets[0].data[3] = this.common.filterKeys['ITG'];//this.ITGCount;
- this.filters[3].value = this.common.filterKeys['ITG'];
+ this.data.datasets[0].data[4] = this.common.filterKeys['ITG'];//this.ITGCount;
+ this.filters[4].value = this.common.filterKeys['ITG'];
this.receivedITGCount = true;
- //});
- //}
-
-
}
searchBtn() {
@@ -683,4 +654,58 @@ export class HomeComponent implements OnInit {
}
this.openITG(ITEM, NAME);
}
+
+ openNotificationsDashboard() {
+ this.common.startLoading();
+ this.totalRequestCount = 0;
+ this.DS.getOpenNotifications('', '', false).subscribe((result: GetOpenNotificationsResponse) => {
+ if (this.common.validResponse(result)) {
+ const key = 'P_OPEN_NTF_NUMBER';
+ // this.totalRequestCount = ;
+ this.ITGCountAllNotification(result[key]);
+ this.common.sharedService.setSharedData(
+ result,
+ 'worklistNotifications'
+ );
+
+ this.common.setFilterValues(result['GetOpenNotificationsList']);
+
+
+ }
+ });
+ }
+ ITGCountAllNotification(count) {
+ this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
+ this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
+ this.common.filterKeys['ITG'] = result.TotalCount;
+ const values = this.common.getFiltersData();
+ this.data = values.data;
+ this.filters = values.filters;
+ this.totalRequestCount = Math.floor(count + result.TotalCount);
+ this.common.sharedService.setSharedData(this.totalRequestCount, 'total-count');
+ this.getCOCNotificationCount();
+ this.common.stopLoading();
+ });
+ }
+ getCOCNotificationCount() {
+ const request = new COCRequest();
+ request.ItgPageSize = 1;
+ request.ItgPageNo = 1;
+ request.Date = moment(new Date()).format("YYYY-MM-DD");
+
+ this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
+ console.log(result);
+ const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
+ const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
+ this.common.filterKeys['COC'] = totalCount;
+
+
+ this.totalRequestCount = Math.floor(this.totalRequestCount + totalCount);
+
+ this.common.sharedService.setSharedData(this.totalRequestCount, 'total-count');
+
+ this.common.stopLoading();
+ });
+ }
+
}
diff --git a/Mohem/src/app/notification/models/COCRequest.ts b/Mohem/src/app/notification/models/COCRequest.ts
new file mode 100644
index 00000000..97e45176
--- /dev/null
+++ b/Mohem/src/app/notification/models/COCRequest.ts
@@ -0,0 +1,8 @@
+import { Request } from 'src/app/hmg-common/services/models/request';
+
+export class COCRequest extends Request {
+ public ItgPageSize: number;
+ public ItgPageNo: number;
+ public Date: string;
+ public EmployeeNumber: string;
+}
\ No newline at end of file
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 76bc3e93..633dd489 100644
--- a/Mohem/src/app/notification/service/work-list.main.service.ts
+++ b/Mohem/src/app/notification/service/work-list.main.service.ts
@@ -20,6 +20,8 @@ import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
import { Request } from 'src/app/hmg-common/services/models/request';
import { LoginModel } from '../../authentication/models/LoginModel';
import { itgRequest } from '../models/itgFormDetailsRequest';
+import { COCRequest } from '../models/COCRequest';
+
import { UserItemTypes } from "../models/userItemTypeRequest";
@Injectable()
@@ -48,6 +50,7 @@ export class WorklistMainService {
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 getCOCCount = 'Services/COCWS.svc/REST/Mohemm_ITG_ReviewerAdmin_Pending_Tasks';
public static getITGFormDetails = 'Services/COCWS.svc/REST/ITGGetFormDetials';
public static getWorklistNotificationURL = 'Services/ERP.svc/REST/GET_USER_ITEM_TYPES';
public static updateWorklistNotificationURL = 'Services/ERP.svc/REST/UPDATE_USER_ITEM_TYPES';
@@ -447,6 +450,28 @@ export class WorklistMainService {
}
}
+ public getCOCCount( request: COCRequest, onError?: any, errorLabel?: string, isPostNoLoad = false): Observable {
+ // const request = new Request();
+ console.log(request);
+ this.authService.authenticateRequest(request);
+ request.EmployeeNumber = request.UserName;
+ if (isPostNoLoad) {
+ return this.api.postNoLoad(
+ WorklistMainService.getCOCCount,
+ request,
+ onError,
+ errorLabel
+ );
+ } else {
+ return this.api.post(
+ WorklistMainService.getCOCCount,
+ request,
+ onError,
+ errorLabel
+ );
+ }
+ }
+
public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable {
this.authService.authenticateRequest(itgrequest);
diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html
index e7dec45b..13606458 100644
--- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html
+++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html
@@ -566,7 +566,7 @@
-
+
Skip
diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts
index f31cf456..fba4d82a 100644
--- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts
+++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts
@@ -193,12 +193,14 @@ export class WorkListMainItgComponent implements OnInit {
});
}
- skip() {
+ skip(flag?) {
// check if the user clicked on all type of request
- this.common.setTotalNumberOfWorklistRequest();
- // this.common.assignDataToFilters(this.common.sharedService.getSharedData('worklistNotifications', false), 'ITG');
- if (this.common.filterKeys['ITG'] != 0)
- this.common.filterKeys['ITG'] = (this.common.filterKeys['ITG'] - 1)
+ if (flag != 'skip') {
+ this.common.setTotalNumberOfWorklistRequest();
+ // this.common.assignDataToFilters(this.common.sharedService.getSharedData('worklistNotifications', false), 'ITG');
+ if (this.common.filterKeys['ITG'] != 0)
+ this.common.filterKeys['ITG'] = (this.common.filterKeys['ITG'] - 1)
+ }
if (this.is_all_items_sents) {
for (let i = 1; i < this.all_request_names.length; i++) {
for (let j = 0; j < this.all_request_names[i].data.length; j++) {
@@ -218,6 +220,7 @@ export class WorkListMainItgComponent implements OnInit {
}
} else if (this.index === this.all_request_names.length) { // if its the end request redirecte to worklist home
this.common.sharedService.setSharedData(true, 'loadWorkList');
+ this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
return false;
}
@@ -233,6 +236,7 @@ export class WorkListMainItgComponent implements OnInit {
return;
} else {
this.common.sharedService.setSharedData(true, 'loadWorkList');
+ this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
return;
}
@@ -240,6 +244,7 @@ export class WorkListMainItgComponent implements OnInit {
}
}
this.common.sharedService.setSharedData(true, 'loadWorkList');
+ this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
return;
}
@@ -498,8 +503,8 @@ export class WorkListMainItgComponent implements OnInit {
}
if (this.actionSelected === 'Delegate') {
this.common.sharedService.setSharedData(info, 'selectedEmpInfo'),
- this.common.sharedService.setSharedData('Delegate','pressedBtn')
- this.presentModal(4);
+ this.common.sharedService.setSharedData('Delegate', 'pressedBtn')
+ this.presentModal(4);
}
if (this.actionSelected === 'Doable') {
this.actionService(1, this.commentText);
@@ -517,7 +522,7 @@ export class WorkListMainItgComponent implements OnInit {
this.actionService(2, this.commentText);
}
if (this.actionSelected === 'RequestInformation') {
- this.common.sharedService.setSharedData('RequestInformation','pressedBtn')
+ this.common.sharedService.setSharedData('RequestInformation', 'pressedBtn')
this.presentModal(3);
}
if (this.actionSelected === 'ReportGenerated') {
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 72d200ca..9d086513 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
@@ -170,6 +170,10 @@
+
+
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 2584b446..928c383a 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
@@ -31,6 +31,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative;
top: 0;
}
+
.profileImage {
width: 60px !important;
}
@@ -38,9 +39,11 @@ button.item-button.button.button-md.button-clear.button-clear-md {
.activated {
border: #209a83 0.02cm solid;
}
+
.deactivated {
border: #e4e4e4 0.02cm solid;
}
+
.repContentDiv {
text-align: center;
width: 85%;
@@ -51,6 +54,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-top: -9px;
margin-right: -35px;
}
+
.selIEmpDiv {
text-align: right;
margin-bottom: -26px;
@@ -70,6 +74,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
+
.filterInput {
border: solid var(--gray) 1px;
border-radius: 21px;
@@ -88,6 +93,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding-right: 129px;
//margin-right: -136px;
}
+
.filterBtn {
background: var(--newgreen);
--background: var (--newgreen);
@@ -95,6 +101,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
height: 60px;
width: 60px;
}
+
.filterBtn-ar {
// background: var(--newgreen);
// --background: var (--newgreen);
@@ -118,6 +125,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding: 8px;
width: 100%;
}
+
.square {
// width:calc(100% / 2);
width: 100%;
@@ -150,19 +158,22 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative;
bottom: 4px;
}
-ion-radio{
- --color-checked: #29B5BF;
- }
-.center{text-align: center;padding: 5px;}
-.boldTxtNav{
- font-weight: bold;
+
+ion-radio {
+ --color-checked: #269db8;
+}
+
+.center {
+ text-align: center;
padding: 5px;
}
+
.boldTxtNav {
text-align: start;
font-weight: bold;
padding: 12px;
}
+
.employee-details {
display: inline-block;
margin: 10px;
@@ -170,15 +181,18 @@ ion-radio{
white-space: nowrap;
width: 70%;
}
+
.empImgeRep {
display: inline-block;
height: 40px;
width: 40px;
}
+
.star-fav {
float: right;
margin: 15px 0px 0px 0px;
}
+
.uk-margin {
margin: 15px 15px 0px 15px;
font-weight: bold;
@@ -186,9 +200,11 @@ ion-radio{
position: relative;
top: 10px;
}
+
.uk-padding {
padding: 20px;
}
+
.uk-padding .employee-details {
bottom: 10px;
position: relative;
@@ -198,57 +214,86 @@ ion-radio{
float: left;
margin: 10px 5px;
}
+
.top-radio-row {
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
+
.textSearchType {
padding-top: 8px;
font-size: 12px;
}
+
.isFavLetterActive {
// background: #269db8;
// width: 55px;
// border-radius: 60px;
color: #269db8;
- display: block;
- width: 60%;
- float: right;
- transition-duration: 0ms;
+ display: block;
+ width: 60%;
+ float: right;
+ transition-duration: 0ms;
height: 35px;
}
+
.vl {
border-left: 2px solid lightgray;
height: 42px;
}
-.clearText{
+
+.clearText {
background: transparent;
color: #D55D5C;
font-weight: bold;
text-decoration: underline;
}
-.searchText{
+
+.searchText {
background: transparent;
color: #269db8;
font-weight: bold;
text-decoration: underline;
}
-.filterClass input{
+
+.filterClass input {
box-shadow: none !important;
-webkit-box-shadow: none !important;
}
-.letterDiv{
- font-weight: bold;
- width: 10%;
+.letterDiv {
+ font-weight: bold;
+ width: 10%;
float: right;
}
-.letterDivLoop{
- display: block;
- width: 60%;
- float: right;
- transition-duration: 0ms;
+
+.letterDivLoop {
+ display: block;
+ width: 60%;
+ float: right;
+ transition-duration: 0ms;
height: 35px;
+}
+
+.square-selected {
+ box-shadow: 5px 2px 8px #ccc;
+ padding: 0px 10px 0px 10px;
+ margin: 0px 15px;
+ border-radius: 10px;
+ position: relative;
+ bottom: 20px;
+}
+
+.square-selected img {
+ height: 20px;
+ width: 20px;
+ bottom: 3px;
+ position: relative;
+
+}
+
+.square-selected span {
+ white-space: normal;
}
\ 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 0e2a6346..b65a3cbc 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
@@ -682,4 +682,10 @@ export class WorkListReplacementRollComponent implements OnInit {
clearSearchInput() {
this.inputSearch = '';
}
+ resetSelected() {
+
+ this.inputSearch = '';
+ this.userSelected = false;
+
+ }
}
diff --git a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts
index e8e41c87..b18b1bba 100644
--- a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts
+++ b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts
@@ -7,6 +7,7 @@ import { WorklistService } from '../service/worklist.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular';
+import { HomeComponent } from '../home/home.component';
@Component({
selector: 'app-work-list-rfc',
@@ -39,7 +40,7 @@ export class WorkListRfcComponent implements OnInit {
public ts: TranslatorService,
public workListMainService: WorklistMainService,
public modalCtrl: ModalController
- ) {
+ ) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
@@ -125,7 +126,7 @@ export class WorkListRfcComponent implements OnInit {
if (result.MessageStatus == 1) {
this.cs.sharedService.setSharedData(true, 'loadWorkList');
-
+
this.messageSuccess = true;
setTimeout(() => {
@@ -138,6 +139,7 @@ export class WorkListRfcComponent implements OnInit {
});
}, 5000);
+ this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage();
}
@@ -178,18 +180,18 @@ export class WorkListRfcComponent implements OnInit {
this.modalCtrl.dismiss();
}
- select(selectEmp,index){
+ select(selectEmp, index) {
console.log(selectEmp.USER_NAME);
console.log(selectEmp.SEQ);
- this.radioButtonValue=selectEmp.USER_NAME
+ this.radioButtonValue = selectEmp.USER_NAME
this.seqNo = selectEmp.SEQ;
-//////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////
// let emp: any = this.RFCEmployeeListListRes[v];
// this.seqNo = emp.SEQ;
// this.radioButtonValue = emp.USER_NAME;
- this.active=index;
+ this.active = index;
}
}
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 b22aa453..d3bb1ab1 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,13 +202,18 @@
+
+ {{'worklist, loading'| translate}} 
+
+
- 0">
+
{{ 'general, empty' | translate}}
-
0 ">
+
0 && !showActionHistoryLoading ">
@@ -414,7 +419,7 @@
-
+
{{approve_label}}
@@ -426,7 +431,7 @@
-
+
{{reject_label}}
@@ -435,7 +440,7 @@
{{reqInfo_label}}
-
+
{{'worklistMain, skip' | translate}}
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 bb4f13d3..4e2a3bf4 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
@@ -129,8 +129,8 @@ export class WorklistMainIcComponent implements OnInit {
reqInfo_label: any;
closeDis: boolean = false;
selectedFilter: string;
- ;
close_label: any;
+ public showActionHistoryLoading = true;
constructor(
public common: CommonService,
@@ -429,10 +429,11 @@ export class WorklistMainIcComponent implements OnInit {
this.common.sharedService.setSharedData(true, 'loadWorkList');
// this.messageSuccess = true;
this.common.greenToastPK('worklist', 'done-successfully');
+ this.common.setTotalNumberOfWorklistRequest();
setTimeout(() => {
- this.common.setTotalNumberOfWorklistRequest();
+
this.nextNotfification();
- }, 5000);
+ }, 300);
} else {
this.common.redToastPK('worklist', 'save-error');
}
@@ -460,7 +461,7 @@ export class WorklistMainIcComponent implements OnInit {
// }
// }
- public nextNotfification() {
+ public nextNotfification(flag?) {
if (document.getElementById('notificationDynamicFieldsPO') != null) {
document.getElementById('notificationDynamicFieldsPO').innerHTML = '';
}
@@ -469,7 +470,7 @@ export class WorklistMainIcComponent implements OnInit {
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
let previousRequestType = this.notificationArray[index].ITEM_TYPE;
- if (this.common.filterKeys[previousRequestType] != 0)
+ if (this.common.filterKeys[previousRequestType] != 0 && flag != 'skip')
this.common.filterKeys[previousRequestType] = (this.common.filterKeys[previousRequestType] - 1)
index += 1;
@@ -482,10 +483,12 @@ export class WorklistMainIcComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
@@ -494,16 +497,16 @@ export class WorklistMainIcComponent implements OnInit {
checkRequestType(index) {
if (this.notificationArray[index].REQUEST_TYPE === 'PO') {
- this.intializeNotificationDetail();
- } else
- if (this.notificationArray[index].REQUEST_TYPE === 'PR') {
+ this.common.openWorklistMainPOPage();
+ } else if (this.notificationArray[index].REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage();
- } else
- if (this.notificationArray[index].REQUEST_TYPE === 'MO') {
+ } else if (this.notificationArray[index].REQUEST_TYPE === 'MO') {
this.common.openWorklistMainMRPage();
- } else {
+ } else if (this.notificationArray[index].REQUEST_TYPE === 'ITEM_CREATION') {
+ this.intializeNotificationDetail();
+ } else {
this.common.openWorklistMainPage();
- }
+ }
}
actionButton(action) {
@@ -541,8 +544,8 @@ export class WorklistMainIcComponent implements OnInit {
// }
if (
- ButtonAction == "APPROVE" ||
- ButtonAction == "REJECT" ||
+ ButtonAction == "APPROVED" ||
+ ButtonAction == "REJECTED" ||
ButtonAction == "DEL" ||
ButtonAction == "CLOSE"
) {
@@ -557,10 +560,10 @@ export class WorklistMainIcComponent implements OnInit {
// this.WorkListActionObj,
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO
// );
- if (ButtonAction == "APPROVE") {
+ if (ButtonAction == "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
- else if (ButtonAction == "REJECT") {
+ else if (ButtonAction == "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
@@ -650,7 +653,8 @@ export class WorklistMainIcComponent implements OnInit {
ButtonAction == "TRANSFER" ||
ButtonAction == "TRANSFER_INFO" ||
ButtonAction == "APPROVE_AND_FORWARD" ||
- ButtonAction == "FORWARD"
+ ButtonAction == "FORWARD" ||
+ ButtonAction == "RETURNED"
) {
@@ -871,6 +875,7 @@ export class WorklistMainIcComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
+ this.showActionHistoryLoading = false;
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
@@ -1219,10 +1224,11 @@ export class WorklistMainIcComponent implements OnInit {
// this.openNotificationsDashboard();
// this.messageSuccess = true;
this.common.greenToastPK('worklist', 'done-successfully');
+ this.common.setTotalNumberOfWorklistRequest();
setTimeout(() => {
- this.common.setTotalNumberOfWorklistRequest();
+
this.nextNotfification();
- }, 100);
+ }, 300);
// this.nextNotfification();
} else {
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 59a8ead5..1ae21026 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,13 +437,19 @@
+
+ {{'worklist, loading'| translate}} 
+
+
-
- 0">
+
+
{{ 'general, empty' | translate}}
-
0 ">
+
+
0 && !showActionHistoryLoading ">
@@ -665,7 +671,7 @@
-
+
{{'worklistMain, skip' | translate}}
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 446da7f1..4881b8c7 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
@@ -118,6 +118,7 @@ export class WorklistMainMRComponent implements OnInit {
close_label: any;
closeDis: boolean = false;
selectedFilter: string;
+ public showActionHistoryLoading = true;
constructor(
@@ -406,7 +407,7 @@ export class WorklistMainMRComponent implements OnInit {
// }
- public nextNotfification() {
+ public nextNotfification(flag?) {
//let itemExist = false;
if (document.getElementById("notificationDynamicFieldsMR") != null) {
document.getElementById("notificationDynamicFieldsMR").innerHTML = "";
@@ -417,7 +418,7 @@ export class WorklistMainMRComponent implements OnInit {
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
let previousRequestType = this.notificationArray[index].ITEM_TYPE;
- if (this.common.filterKeys[previousRequestType] != 0)
+ if (this.common.filterKeys[previousRequestType] != 0 && flag != 'skip')
this.common.filterKeys[previousRequestType] = (this.common.filterKeys[previousRequestType] - 1)
index += 1;
@@ -430,10 +431,12 @@ export class WorklistMainMRComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
@@ -807,6 +810,7 @@ export class WorklistMainMRComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
+ this.showActionHistoryLoading = false;
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
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 55ef6125..c5d2eb66 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,13 +170,19 @@
+
+ {{'worklist, loading'| translate}} 
+
+
- 0">
+
{{ 'general, empty' | translate}}
-
0 ">
+
+
0 && !showActionHistoryLoading ">
@@ -633,7 +639,7 @@
{{reqInfo_label}}
-
+
{{'worklistMain, skip' | translate}}
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 74a65fac..273b590f 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,8 +129,9 @@ export class WorklistMainPoComponent implements OnInit {
reqInfo_label: any;
closeDis: boolean = false;
selectedFilter: string;
- ;
close_label: any;
+ public showActionHistoryLoading = true;
+
constructor(
public common: CommonService,
@@ -437,7 +438,7 @@ export class WorklistMainPoComponent implements OnInit {
// }
// }
- public nextNotfification() {
+ public nextNotfification(flag?) {
if (document.getElementById('notificationDynamicFieldsPO') != null) {
document.getElementById('notificationDynamicFieldsPO').innerHTML = '';
}
@@ -447,7 +448,7 @@ export class WorklistMainPoComponent implements OnInit {
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
let previousRequestType = this.notificationArray[index].ITEM_TYPE;
- if (this.common.filterKeys[previousRequestType] != 0)
+ if (this.common.filterKeys[previousRequestType] != 0 && flag != 'skip')
this.common.filterKeys[previousRequestType] = (this.common.filterKeys[previousRequestType] - 1)
index += 1;
@@ -460,10 +461,12 @@ export class WorklistMainPoComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
@@ -849,6 +852,7 @@ export class WorklistMainPoComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
+ this.showActionHistoryLoading = false;
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
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 ccc730ee..50db52b7 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
@@ -200,13 +200,17 @@
+
+ {{'worklist, loading'| translate}} 
+
+
-
- 0">
+
{{ 'general, empty' | translate}}
-
0 ">
+
0 && !showActionHistoryLoading">
@@ -411,7 +415,7 @@
{{reqInfo_label}}
-
+
{{'worklistMain, skip' | translate}}
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 766f7c6e..b4ca5a33 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
@@ -115,6 +115,7 @@ export class WorklistMainPRComponent implements OnInit {
close_label: any;
closeDis: boolean = false;
selectedFilter: any;
+ public showActionHistoryLoading = true;
constructor(
@@ -425,7 +426,7 @@ export class WorklistMainPRComponent implements OnInit {
// }
- public nextNotfification() {
+ public nextNotfification(flag?) {
//let itemExist = false;
if (document.getElementById("notificationDynamicFieldsPR") != null) {
@@ -438,7 +439,7 @@ export class WorklistMainPRComponent implements OnInit {
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
let previousRequestType = this.notificationArray[index].ITEM_TYPE;
- if (this.common.filterKeys[previousRequestType] != 0)
+ if (this.common.filterKeys[previousRequestType] != 0 && flag != 'skip')
this.common.filterKeys[previousRequestType] = (this.common.filterKeys[previousRequestType] - 1)
index += 1;
@@ -451,10 +452,12 @@ export class WorklistMainPRComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
@@ -834,6 +837,7 @@ export class WorklistMainPRComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
+ this.showActionHistoryLoading = false;
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
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 0a05a4a6..8f45a481 100644
--- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html
+++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html
@@ -317,12 +317,12 @@
- Current
+ {{ 'general, current' | translate}}
- Proposed
+ {{ 'general, proposed' | translate}}
@@ -624,14 +624,18 @@
+
+ {{'worklist, loading'| translate}} 
+
- 0">
+
{{ 'general, empty' | translate}}
-
0 ">
+
0 && !showActionHistoryLoading ">
@@ -821,7 +825,7 @@
{{reqInfo_label}}
-
+
{{'worklistMain, skip' | translate}}
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 c55e7902..3446ad12 100644
--- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
+++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
@@ -111,6 +111,7 @@ export class WorklistMainComponent implements OnInit {
public selectedFilter: string;
public arr_hr_req_only = [];
public showInformation = true;
+ public showActionHistoryLoading = true;
constructor(
@@ -437,6 +438,7 @@ export class WorklistMainComponent implements OnInit {
result.GetAbsenceCollectionNotificationBodyList;
}
} else if (Type === "ADDRESS") {
+ console.log(result.GetAddressNotificationBodyList)
if (result.GetAddressNotificationBodyList) {
this.notificationBodyRes =
result.GetAddressNotificationBodyList;
@@ -560,11 +562,10 @@ export class WorklistMainComponent implements OnInit {
// }
// this.messageSuccess = true;
this.common.greenToastPK('worklist', 'done-successfully');
-
+ this.common.setTotalNumberOfWorklistRequest();
setTimeout(() => {
- this.common.setTotalNumberOfWorklistRequest();
this.nextNotfification();
- }, 100);
+ }, 300);
} else {
this.common.redToastPK('worklist', 'save-error');
}
@@ -596,7 +597,7 @@ export class WorklistMainComponent implements OnInit {
// }
- public nextNotfification() {
+ public nextNotfification(flag?) {
if (document.getElementById("notificationDynamicFields") != null) {
document.getElementById("notificationDynamicFields").innerHTML = "";
}
@@ -613,7 +614,7 @@ export class WorklistMainComponent implements OnInit {
} else {
previousRequest = itemType;
}
- if (this.common.filterKeys[previousRequest] != 0)
+ if (this.common.filterKeys[previousRequest] != 0 && flag != 'skip')
this.common.filterKeys[previousRequest] = (this.common.filterKeys[previousRequest] - 1)
index += 1;
@@ -631,14 +632,14 @@ export class WorklistMainComponent implements OnInit {
this.intializeNotificationDetail();
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
-
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.openNotificationPage();
}
}
}
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
-
+ //this.common.setTotalNumberOfWorklistRequest(true);
this.common.openNotificationPage();
}
@@ -1000,6 +1001,7 @@ export class WorklistMainComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
+ this.showActionHistoryLoading = false;
console.log("1" + this.IsReachEnd);
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
@@ -1160,7 +1162,7 @@ export class WorklistMainComponent implements OnInit {
setTimeout(() => {
// this.messageSuccess = false;
this.nextNotfification();
- }, 100);
+ }, 300);
// this.nextNotfification();
} else {
this.common.redToastPK('worklist', 'save-error');
@@ -1290,7 +1292,7 @@ export class WorklistMainComponent implements OnInit {
showLoading(notificationList) {
if (notificationList.length < 0) {
return true;
- } else if (notificationList === []) {
+ } else if (notificationList.length == 0) {
return false;
} else { return true; }
}
diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html
index b84354f8..cfab7d6d 100644
--- a/Mohem/src/app/offersdiscount/home/home.component.html
+++ b/Mohem/src/app/offersdiscount/home/home.component.html
@@ -54,22 +54,22 @@
-
- {{item.Title}}
- {{item.Title_AR}}
+
+ {{item.titleEn}}
+ {{item.titleAr}}
-
-
+
+
- {{item.Discount}}
+ {{item.discountDescription}}
-
-
+
+
{{ts.trPK('general','offer-valid')}}
-
+
{{ts.trPK('general','expired')}}
diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts
index 8eadda68..ac88296a 100644
--- a/Mohem/src/app/offersdiscount/home/home.component.ts
+++ b/Mohem/src/app/offersdiscount/home/home.component.ts
@@ -113,13 +113,18 @@ export class HomeComponent implements AfterViewInit {
displayOffers(data) {
if (data['data']) {
- var parseJSON = data['data'];
- var offers = JSON.parse(parseJSON);
- this.offersData = offers;
+ var offers = data['data'];
+ console.log(offers);
+ this.offersData = this.filterActiveItems(offers);
+ console.log(this.offersData);
this.tempSearch = this.offersData;
}
}
-
+ filterActiveItems(offers) {
+ return offers.filter((res) => {
+ return res.isActive == true;
+ });
+ }
filterOffers(key) {
if (this.direction === 'ltr') {
this.activeClass = key.categoryName_en;
@@ -181,7 +186,8 @@ export class HomeComponent implements AfterViewInit {
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'), this.itemCounter, this.itemType).subscribe((res) => {
const data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
if (data['result']) {
- const allItem = JSON.parse(data.result['data']);
+ var allItem = JSON.parse(data.result['data']);
+ allItem = this.filterActiveItems(allItem);
if (allItem) {
allItem.forEach(element => {
this.offersData.push(element);
@@ -198,7 +204,8 @@ export class HomeComponent implements AfterViewInit {
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'), this.itemCounter).subscribe((res) => {
const data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
if (data['result']) {
- const allItem = JSON.parse(data.result['data']);
+ var allItem = JSON.parse(data.result['data']);
+ allItem = this.filterActiveItems(allItem);
if (allItem) {
allItem.forEach(element => {
this.offersData.push(element);
diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
index e089da6a..831659ad 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
@@ -11,23 +11,25 @@
-
-
-
+
+
+
- {{details.Title}}
- {{details.Title_AR}}
+ {{details.titleEn}}
+ {{details.titleAr}}
-
-
+
+
-
-
+
+
{{ts.trPK('general','offer-valid')}}
-
+
{{ts.trPK('general','expired')}}
@@ -67,23 +69,25 @@
-
+
- {{item.Title}}
+ {{item.titleEn}}
+ {{item.titleAr}}
-
+
+
- {{item.Discount}}
+ {{item.discountDescription}}
-
-
+
+
{{ts.trPK('general','offer-valid')}}
-
+
{{ts.trPK('general','expired')}}
diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
index ee364abe..ac8ef5fb 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
@@ -25,7 +25,7 @@ export class OfferDetailsComponent implements OnInit {
}
getDotted(temp) {
temp = this.stripHtml(temp);
- return temp.substring(0, 100) + " ...";
+ return temp.substring(0, 40) + " ...";
}
stripHtml(html) {
var temporalDivElement = document.createElement("div");
diff --git a/Mohem/src/app/offersdiscount/offersdiscount.module.ts b/Mohem/src/app/offersdiscount/offersdiscount.module.ts
index b4062b63..fa0495d4 100644
--- a/Mohem/src/app/offersdiscount/offersdiscount.module.ts
+++ b/Mohem/src/app/offersdiscount/offersdiscount.module.ts
@@ -12,6 +12,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { OfferDiscountService } from './services/service';
import { FilterComponent } from './filter/filter.component';
import { LocationComponent } from './location/location.component';
+import { ImageModalModule } from '../hmg-common/ui/image-modal/image-modal.module';
@@ -48,6 +49,7 @@ const routes: Routes = [
FormsModule,
IonicModule,
HmgCommonModule,
+ ImageModalModule,
RouterModule.forChild(routes)
],
declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent, FilterComponent, LocationComponent],
diff --git a/Mohem/src/app/offersdiscount/services/service.ts b/Mohem/src/app/offersdiscount/services/service.ts
index 2a838807..17a39e77 100644
--- a/Mohem/src/app/offersdiscount/services/service.ts
+++ b/Mohem/src/app/offersdiscount/services/service.ts
@@ -32,7 +32,7 @@ export class OfferDiscountService {
request['EmployeeNumber'] = request.UserName;
request['ItgIsActive'] = true;
request['ItgPageSize'] = 10;
- request['ItgPageNo'] = pageNo;
+ request['ItgPageNo'] = pageNo ? pageNo : 1;
if (catId) {
request['ItgCategoryID'] = categoryId;
}
diff --git a/Mohem/src/app/pending-transaction/home/home.component.html b/Mohem/src/app/pending-transaction/home/home.component.html
index 1aff4ba1..6ac756a4 100644
--- a/Mohem/src/app/pending-transaction/home/home.component.html
+++ b/Mohem/src/app/pending-transaction/home/home.component.html
@@ -71,7 +71,7 @@
0" class="transaction-list">
- {{transaction.CREATION_DATE}}
+ {{transaction.CREATION_DATE}}
{{'transaction, created-for' | translate}}
diff --git a/Mohem/src/app/pending-transaction/home/home.component.scss b/Mohem/src/app/pending-transaction/home/home.component.scss
index 1f4f2512..d5c8e7ac 100644
--- a/Mohem/src/app/pending-transaction/home/home.component.scss
+++ b/Mohem/src/app/pending-transaction/home/home.component.scss
@@ -17,7 +17,7 @@
.color-black{
color:#000;
}
-.date{
+.date-en{
position: absolute;
font-size: 14px;
padding: 10px;
@@ -26,6 +26,15 @@
color:#969696;
margin: -8px;
}
+.date-ar{
+ position: absolute;
+ font-size: 14px;
+ padding: 10px;
+ left: 10px;
+ width: 100px;
+ color:#969696;
+ margin: -8px;
+}
.transaction-list{
margin-top:20px;
}
diff --git a/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts b/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts
index 2e1f8ea0..95ad98d7 100644
--- a/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts
+++ b/Mohem/src/app/profile/add-basic-details/add-basic-details.component.ts
@@ -49,7 +49,7 @@ export class AddBasicDetailsComponent implements OnInit {
private hiddenInput: HiddenInput;
private eitResponse: any;
private eitColResponse: any;
-
+
private eitVALSettoCall: any = [];
private comtransNo: number = 0;
getPassMnuEntryObj: MenuEntry;
@@ -65,7 +65,7 @@ export class AddBasicDetailsComponent implements OnInit {
isResubmit: boolean = false;
private updatedValues: any = [];
addEITData: any;
- direction:string;
+ direction: string;
public targetValue: any;
public employeeBasicDetails: any = [];
public mutualBasicDetailsArray: any = [];
@@ -135,7 +135,7 @@ export class AddBasicDetailsComponent implements OnInit {
}
}
- ngOnInit() {}
+ ngOnInit() { }
ngAfterViewInit() {
this.getEitDffStructure();
@@ -171,7 +171,7 @@ export class AddBasicDetailsComponent implements OnInit {
this.drawEitFieldsStatic(result.GetBasicDetColsStructureList);
}
}
-
+
public handleBasicDffStructureResult(result) {
if (result.GetBasicDetDffStructureList != null) {
this.getColumnStructure();
@@ -188,59 +188,59 @@ export class AddBasicDetailsComponent implements OnInit {
let defaultValText: string = "";
if (feildsList[i].DISPLAY_FLAG != "N") {
- //text , date , time
- if (feildsList[i].DATATYPE == "VARCHAR2" && feildsList[i].ObjectValuesList === null) {
- // character
- this.textInput = new TextInput(
- feildsList[i].SEGMENT_PROMPT,
- feildsList[i].APPLICATION_COLUMN_NAME,
- defaultVal,
- containerId,
- defaultValText,
- feildsList[i].MOBILE_ENABLED,
- feildsList[i].DISPLAY_FLAG,
- feildsList[i].REQUIRED_FLAG
- );
- } else if (feildsList[i].DATATYPE == "VARCHAR2" && feildsList[i].ObjectValuesList !== null) {
- this.selectInput = new SelectInput(
- feildsList[i].SEGMENT_PROMPT,
- feildsList[i].APPLICATION_COLUMN_NAME,
- defaultVal,
- containerId,
- feildsList[i].MOBILE_ENABLED,
- feildsList[i].DISPLAY_FLAG,
- feildsList[i].REQUIRED_FLAG
- );
- this.fillStaticDropdownList(
- feildsList[i].SEGMENT_NAME,
- feildsList[i].ObjectValuesList,
- feildsList[i].APPLICATION_COLUMN_NAME
- );
- } else if (feildsList[i].DATATYPE == "NUMBER") {
- this.numberInput = new NumberInput(
- feildsList[i].SEGMENT_PROMPT,
- feildsList[i].APPLICATION_COLUMN_NAME,
- defaultVal,
- containerId,
- feildsList[i].MOBILE_ENABLED,
- feildsList[i].DISPLAY_FLAG,
- feildsList[i].REQUIRED_FLAG
- );
- } else if (feildsList[i].DATATYPE == "DATE" && this.targetValue === 'new') {
- this.dateInput = new DateInput(
- feildsList[i].SEGMENT_PROMPT,
- feildsList[i].APPLICATION_COLUMN_NAME,
- "",
- containerId,
- feildsList[i].MOBILE_ENABLED,
- feildsList[i].DISPLAY_FLAG,
- feildsList[i].REQUIRED_FLAG,
- this.direction
- );
-
+ //text , date , time
+ if (feildsList[i].DATATYPE == "VARCHAR2" && feildsList[i].ObjectValuesList === null) {
+ // character
+ this.textInput = new TextInput(
+ feildsList[i].SEGMENT_PROMPT,
+ feildsList[i].APPLICATION_COLUMN_NAME,
+ defaultVal,
+ containerId,
+ defaultValText,
+ feildsList[i].MOBILE_ENABLED,
+ feildsList[i].DISPLAY_FLAG,
+ feildsList[i].REQUIRED_FLAG
+ );
+ } else if (feildsList[i].DATATYPE == "VARCHAR2" && feildsList[i].ObjectValuesList !== null) {
+ this.selectInput = new SelectInput(
+ feildsList[i].SEGMENT_PROMPT,
+ feildsList[i].APPLICATION_COLUMN_NAME,
+ defaultVal,
+ containerId,
+ feildsList[i].MOBILE_ENABLED,
+ feildsList[i].DISPLAY_FLAG,
+ feildsList[i].REQUIRED_FLAG
+ );
+ this.fillStaticDropdownList(
+ feildsList[i].SEGMENT_NAME,
+ feildsList[i].ObjectValuesList,
+ feildsList[i].APPLICATION_COLUMN_NAME
+ );
+ } else if (feildsList[i].DATATYPE == "NUMBER") {
+ this.numberInput = new NumberInput(
+ feildsList[i].SEGMENT_PROMPT,
+ feildsList[i].APPLICATION_COLUMN_NAME,
+ defaultVal,
+ containerId,
+ feildsList[i].MOBILE_ENABLED,
+ feildsList[i].DISPLAY_FLAG,
+ feildsList[i].REQUIRED_FLAG
+ );
+ } else if (feildsList[i].DATATYPE == "DATE" && this.targetValue === 'new') {
+ this.dateInput = new DateInput(
+ feildsList[i].SEGMENT_PROMPT,
+ feildsList[i].APPLICATION_COLUMN_NAME,
+ "",
+ containerId,
+ feildsList[i].MOBILE_ENABLED,
+ feildsList[i].DISPLAY_FLAG,
+ feildsList[i].REQUIRED_FLAG,
+ this.direction
+ );
+
}
+ }
}
- }
this.fillBasicDetailsStructure();
}
@@ -251,7 +251,7 @@ export class AddBasicDetailsComponent implements OnInit {
let numbervalue: any = 0;
let dateValue: any = null;
let transNo: number = 1;
- let textValue : any;
+ let textValue: any;
for (let i = 0; i < this.eitColResponse.length; i++) {
varcharValue = null;
@@ -260,10 +260,10 @@ export class AddBasicDetailsComponent implements OnInit {
if (this.eitColResponse[i].DISPLAY_FLAG != "N") {
if (this.eitColResponse[i].ObjectValuesList === null) {
- let elem = document.getElementById( this.eitColResponse[i].APPLICATION_COLUMN_NAME) as HTMLInputElement;
- let elemVal = elem !== null ? (document.getElementById( this.eitColResponse[i].APPLICATION_COLUMN_NAME ) as HTMLInputElement).value : '';
+ let elem = document.getElementById(this.eitColResponse[i].APPLICATION_COLUMN_NAME) as HTMLInputElement;
+ let elemVal = elem !== null ? (document.getElementById(this.eitColResponse[i].APPLICATION_COLUMN_NAME) as HTMLInputElement).value : '';
textValue = elemVal;
-
+
if (this.eitColResponse[i].DATATYPE == "VARCHAR2" || this.eitColResponse[i].DATATYPE == "NUMBER") {
elemVal = elemVal;
} else if (this.eitColResponse[i].DATATYPE == "DATE" && this.targetValue === 'new') {
@@ -272,7 +272,7 @@ export class AddBasicDetailsComponent implements OnInit {
} else if (this.eitColResponse[i].DATATYPE == "DATE" && this.targetValue === 'correct') {
// date
elemVal = this.customiseDate(this.effectiveDate);
- }
+ }
if (this.targetValue === 'new') {
if (this.eitColResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
@@ -301,11 +301,11 @@ export class AddBasicDetailsComponent implements OnInit {
} else {
let x = document.getElementById(this.eitColResponse[i].APPLICATION_COLUMN_NAME) as HTMLSelectElement;
- let val = x.options[x.selectedIndex] ? x.options[x.selectedIndex].value : null;
- let txt = x.options[x.selectedIndex] ? x.options[x.selectedIndex].text : null;
- varcharValue = val;
- textValue = txt;
-
+ let val = x.options[x.selectedIndex] ? x.options[x.selectedIndex].value : null;
+ let txt = x.options[x.selectedIndex] ? x.options[x.selectedIndex].text : null;
+ varcharValue = val;
+ textValue = txt;
+
if (x !== null) {
if (this.eitColResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) {
x.classList.add("requiredClassElm");
@@ -323,7 +323,7 @@ export class AddBasicDetailsComponent implements OnInit {
DATE_VALUE: dateValue
});
}
- } else {
+ } else {
let x = document.getElementById(this.eitColResponse[i].APPLICATION_COLUMN_NAME) as HTMLSelectElement;
let val = x !== null ? x.dataset.colmText : '';
textValue = x !== null ? x.value : '';
@@ -815,8 +815,8 @@ export class AddBasicDetailsComponent implements OnInit {
let obj = this.handleDefaultValueResult(result);
let val = obj.value;
let text = obj.text;
- if (val==null){val="";}
- if (text==null){text="";}
+ if (val == null) { val = ""; }
+ if (text == null) { text = ""; }
if (isStandardDate) {
console.log("isStandardDate");
elem.value = this.cs.reverseFormatDate(val);
@@ -834,7 +834,7 @@ export class AddBasicDetailsComponent implements OnInit {
if (val) {
elem.dataset.dtvalue = val;
elem.innerHTML = val;
- elem.value=val;
+ elem.value = val;
} else {
elem.dataset.dtvalue = "";
elem.innerHTML = "";
@@ -843,11 +843,11 @@ export class AddBasicDetailsComponent implements OnInit {
if (isSelectElement) {
let elem = this.getSelectElementByName(segmentName);
elem = document.getElementById(elem),
- elem.value = val;
+ elem.value = val;
} else {
- elem.value = val;
- elem.innerText = text;
- elem.setAttribute("value", val);
+ elem.value = val;
+ elem.innerText = text;
+ elem.setAttribute("value", val);
}
}
if (isHidden || isReadOnlyList) {
@@ -1234,7 +1234,7 @@ export class AddBasicDetailsComponent implements OnInit {
}
public customiseDate(date: any) {
- let formatedDate = date.slice(0,9);
+ let formatedDate = date.slice(0, 9);
let newDate = formatedDate.split("/").reverse();
const tmp = newDate[2];
newDate[2] = newDate[1];
@@ -1248,7 +1248,7 @@ export class AddBasicDetailsComponent implements OnInit {
public fillBasicDetailsStructure() {
this.mutualBasicDetailsArray = this.mutualBasicDetailsArray.concat(this.eitResponse, this.eitColResponse);
-
+
for (let i = 0; i < this.employeeBasicDetails.length; i++) {
let val: any;
if (this.employeeBasicDetails[i].VARCHAR2_VALUE) {
@@ -1256,13 +1256,13 @@ export class AddBasicDetailsComponent implements OnInit {
} else if (this.employeeBasicDetails[i].DATE_VALUE) {
val = this.customiseDate(this.employeeBasicDetails[i].DATE_VALUE);
if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'EFFECTIVE_DATE') {
- this.effectiveDate = this.employeeBasicDetails[i].DATE_VALUE;
+ this.effectiveDate = this.employeeBasicDetails[i].DATE_VALUE;
this.showEffectiveDate = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP;
}
} else if (this.employeeBasicDetails[i].NUMBER_VALUE) {
val = this.employeeBasicDetails[i].NUMBER_VALUE;
}
- const elem = document.getElementById( this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME ) as HTMLInputElement;
+ const elem = document.getElementById(this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME) as HTMLInputElement;
if (elem) {
if (val) {
let feldDetails = this.mutualBasicDetailsArray.find(
@@ -1367,7 +1367,7 @@ export class AddBasicDetailsComponent implements OnInit {
let numbervalue: any = 0;
let dateValue: any = null;
let transNo: number = 1;
- let textValue : any;
+ let textValue: any;
// if(this.ExtraObj.transactionNo)
// transNo=this.ExtraObj.transactionNo;
for (let i = 0; i < this.eitResponse.length; i++) {
@@ -1413,11 +1413,11 @@ export class AddBasicDetailsComponent implements OnInit {
this.eitResponse[i].DISPLAY_FLAG != "N"
) {
//time
- if(elemVal.length>5){
- elemVal = elemVal.substring(11, 16);
- }else{
- elemVal = elemVal;
- }
+ if (elemVal.length > 5) {
+ elemVal = elemVal.substring(11, 16);
+ } else {
+ elemVal = elemVal;
+ }
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
elem.classList.add("requiredClassElm");
@@ -1426,11 +1426,11 @@ export class AddBasicDetailsComponent implements OnInit {
} else {
elem.classList.remove("requiredClassElm");
}
- // if (elemVal != 'null'){
- varcharValue = elemVal;
+ // if (elemVal != 'null'){
+ varcharValue = elemVal;
//} else{
- // elemVal = null;
- // }
+ // elemVal = null;
+ // }
valuseArr.push({
TRANSACTION_NUMBER: transNo,
NAME: this.eitResponse[i].APPLICATION_COLUMN_NAME,
@@ -1759,15 +1759,15 @@ export class AddBasicDetailsComponent implements OnInit {
P_SELECTED_RESP_ID: this.respID,
P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME,
EITTransactionTBL: allStatisDynamicValues,
- P_ACTION_TYPE: this.targetValue === 'correct' ? 'CORRECT' : 'CHANGE'
+ P_ACTION_TYPE: this.targetValue === 'correct' ? 'CORRECT' : 'CHANGE'
};
console.log(this.basicRequest);
this.profileService.submitBasicDetailsTransaction(this.basicRequest).subscribe((result: any) => {
- this.handleBasicdetailsResult(result);
+ this.handleBasicdetailsResult(result);
});
}
}
-
+
}
diff --git a/Mohem/src/app/profile/confirm-address/confirm-address.component.ts b/Mohem/src/app/profile/confirm-address/confirm-address.component.ts
index f84248f9..fb51f580 100644
--- a/Mohem/src/app/profile/confirm-address/confirm-address.component.ts
+++ b/Mohem/src/app/profile/confirm-address/confirm-address.component.ts
@@ -10,6 +10,7 @@ import { SubmitEitModalComponent } from 'src/app/eit/submit-eit-modal/submit-eit
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { HomeComponent } from 'src/app/notification/home/home.component';
import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes';
import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
@@ -103,6 +104,7 @@ export class ConfirmAddressComponent implements OnInit {
if (this.isContact) {
this.itemKey = this.addrespList.SubmitPhonesTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitPhonesTransactionList.P_TRANSACTION_ID;
+ this.headerTitle = this.ts.trPK('general', 'contact');
} else {
this.itemKey = this.addrespList.SubmitAddressTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitAddressTransactionList.P_TRANSACTION_ID;
@@ -263,12 +265,14 @@ export class ConfirmAddressComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitEIT==false){
- let msg: string = this.ts.trPK("eit", "approval-message-success");
- this.cs.presentAlert(msg);
+ // let msg: string = this.ts.trPK("eit", "approval-message-success");
+ // this.cs.presentAlert(msg);
+ this.cs.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
-
+ this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
// this.cs.openHome();
+ //this.cs.setTotalNumberOfWorklistRequest(true);
this.cs.openNotificationPage();
}
}
diff --git a/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.ts b/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.ts
index ef49d9e4..8b34d7f4 100644
--- a/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.ts
+++ b/Mohem/src/app/profile/confirm-basic-details/confirm-basic-details.component.ts
@@ -15,6 +15,7 @@ import { WorkListButtonRequest } from 'src/app/notification/models/NotificationB
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { ProfileService } from '../service/profile.service';
import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component';
+import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({
selector: 'app-confirm-basic-details',
@@ -77,7 +78,7 @@ export class ConfirmBasicDetailsComponent implements OnInit {
this.basicRequest = this.cs.sharedService.getSharedData(BasicRequest.SHARED_DATA, false);
this.selEmp = this.basicRequest.P_SELECTED_EMPLOYEE_NUMBER;
-
+
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.basicResponseList = this.cs.sharedService.getSharedData('basic-details-response', false);
@@ -87,7 +88,7 @@ export class ConfirmBasicDetailsComponent implements OnInit {
// this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
this.getApproversList();
-
+
}
getApproversList() {
@@ -98,7 +99,7 @@ export class ConfirmBasicDetailsComponent implements OnInit {
P_PAGE_LIMIT: 1000
}
this.eitService.getApproversList(body).subscribe((result: any) => {
- this.handleApproversResult(result);
+ this.handleApproversResult(result);
});
}
@@ -191,8 +192,10 @@ export class ConfirmBasicDetailsComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
- let msg: string = this.ts.trPK("eit", "approval-message-success");
- this.cs.presentAlert(msg);
+ // let msg: string = this.ts.trPK("eit", "approval-message-success");
+ // this.cs.presentAlert(msg);
+ this.cs.greenToastPK("eit", "approval-message-success");
+ this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage();
}
}
@@ -301,7 +304,7 @@ export class ConfirmBasicDetailsComponent implements OnInit {
modal.onDidDismiss()
.then((data) => {
- });
+ });
return await modal.present();
}
@@ -430,6 +433,6 @@ export class ConfirmBasicDetailsComponent implements OnInit {
} catch (e) {
}
}
-
+
}
diff --git a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts
index 688e3443..894fb16e 100644
--- a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts
+++ b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts
@@ -15,6 +15,7 @@ import { WorkListButtonRequest } from 'src/app/notification/models/NotificationB
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { ProfileService } from '../service/profile.service';
import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component';
+import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({
@@ -192,8 +193,10 @@ export class ConfirmContactComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
- let msg: string = this.ts.trPK("eit", "approval-message-success");
- this.cs.presentAlert(msg);
+ // let msg: string = this.ts.trPK("eit", "approval-message-success");
+ // this.cs.presentAlert(msg);
+ this.cs.greenToastPK("eit", "approval-message-success");
+ this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage();
}
}
diff --git a/Mohem/src/app/profile/contact/contact.component.ts b/Mohem/src/app/profile/contact/contact.component.ts
index e137b838..26f814b0 100644
--- a/Mohem/src/app/profile/contact/contact.component.ts
+++ b/Mohem/src/app/profile/contact/contact.component.ts
@@ -74,14 +74,10 @@ export class ConatactComponent implements OnInit {
this.setIsDeletedStatus();
console.log(this.phoneNumbers);
this.submitrequest = {
-
P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE,
P_SELECTED_RESP_ID: this.respID, //this.selMenu.List_Menu.RESP_ID,//-999,
P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME,
P_MBL_PHONES_TBL: this.phoneNumbers,
-
-
-
};
this.profileService.submitPhoneTransaction(this.submitrequest, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
if (this.cs.validResponse(response)) {
diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html
index 682c8590..cd3bbece 100644
--- a/Mohem/src/app/profile/home/home.component.html
+++ b/Mohem/src/app/profile/home/home.component.html
@@ -230,13 +230,15 @@
0">
-
+
+
{{phone.PHONE_TYPE_MEANING}}
{{phone.PHONE_NUMBER}}
-
+
+
diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss
index 8cc51c0a..aec0c7f5 100644
--- a/Mohem/src/app/profile/home/home.component.scss
+++ b/Mohem/src/app/profile/home/home.component.scss
@@ -199,7 +199,7 @@ ion-thumbnail.menu-thumb {
margin: -12px 0px 0px 25px;
}
.service-row-ar {
- width: 108%;
+ width: 104%;
margin: -12px 0px 0px 0px;
}
@@ -1178,7 +1178,7 @@ $actionBtnSize: 36px;
.card-size-info-ar{
width: 90%;
- right: 5%;
+ right: 3%;
padding-right: 0px;
margin-left: 0px;
}
diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts
index 11a89923..1617c61c 100644
--- a/Mohem/src/app/profile/home/home.component.ts
+++ b/Mohem/src/app/profile/home/home.component.ts
@@ -407,6 +407,7 @@ export class HomeComponent implements OnInit {
if (this.cs.validResponse(response)) {
this.cs.stopLoading();
this.phoneNumbers = response['GetEmployeePhonesList'];
+ console.log(this.phoneNumbers);
this.cs.sharedService.setSharedData(this.phoneNumbers, ProfileService.EMP_PHONE);
}
})
diff --git a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts
index 8fb275f0..c064e86b 100644
--- a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts
+++ b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts
@@ -1290,9 +1290,10 @@ export class ConcurrentReportComponent implements OnInit {
return values;
}
selectTemplates() {
- this.elementRef
- .nativeElement.querySelectorAll('#containerDiv')[0].innerHTML = '';
- this.getCppDiffStructure(this.template);
+ this.elementRef.nativeElement.querySelectorAll('#containerDiv')[0].innerHTML = '';
+ if (this.template) {
+ this.getCppDiffStructure(this.template);
+ }
}
refreshStatus() {
diff --git a/Mohem/src/app/reports/reports.module.ts b/Mohem/src/app/reports/reports.module.ts
index 0fc1953d..789a61cd 100644
--- a/Mohem/src/app/reports/reports.module.ts
+++ b/Mohem/src/app/reports/reports.module.ts
@@ -10,6 +10,7 @@ import { ConcurrentReportComponent } from './concurrent-report/concurrent-report
import { ReportServiceService } from './report-service.service';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { TransactionListComponent } from './transaction-list/transaction-list.component';
+import { TransactionsComponent } from './transactions/transactions.component';
const routes: Routes = [
@@ -25,6 +26,10 @@ const routes: Routes = [
path: 'transaction-list',
component: TransactionListComponent
},
+ {
+ path: 'transactions',
+ component: TransactionsComponent
+ },
],
}
];
@@ -37,7 +42,7 @@ const routes: Routes = [
RouterModule.forChild(routes),
HmgCommonModule
],
- declarations: [ReportsPage, ConcurrentReportComponent, TransactionListComponent],
+ declarations: [ReportsPage, ConcurrentReportComponent, TransactionListComponent, TransactionsComponent],
providers: [ReportServiceService]
})
export class ReportsPageModule { }
diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.html b/Mohem/src/app/reports/transaction-list/transaction-list.component.html
index cfffd088..21a758a7 100644
--- a/Mohem/src/app/reports/transaction-list/transaction-list.component.html
+++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.html
@@ -1,7 +1,11 @@
diff --git a/Mohem/src/app/reports/transactions/transactions.component.html b/Mohem/src/app/reports/transactions/transactions.component.html
new file mode 100644
index 00000000..fce2455c
--- /dev/null
+++ b/Mohem/src/app/reports/transactions/transactions.component.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+ {{ 'worklist,template-name' | translate}}
+
+
+ {{ program.USER_CONCURRENT_PROGRAM_NAME}}
+
+
+
0" class="transaction-list">
+
+ {{getDate(transaction.REQUEST_DATE)}}
+
+
+
+
{{'transaction, request-id' | translate}}
+
+ {{transaction.REQUEST_ID}}
+
+
+ {{'transaction, phase' | translate}}
+ {{transaction.CCP_PHASE}}
+
+
+
+
+
{{'transaction,program-name' | translate}}
+
{{transaction.CONCURRENT_PROGRAM_NAME}}
+
+
+
+
+
+
{{'transaction,output' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
{{'general, noData' | translate}}
+
+
+
+
+
diff --git a/Mohem/src/app/reports/transactions/transactions.component.scss b/Mohem/src/app/reports/transactions/transactions.component.scss
new file mode 100644
index 00000000..378cb377
--- /dev/null
+++ b/Mohem/src/app/reports/transactions/transactions.component.scss
@@ -0,0 +1,213 @@
+.display-created {
+ display: inline-block;
+ margin: 2px;
+ color: #000;
+}
+
+#containerDiv {
+ margin-top: 20px;
+}
+
+.padding {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.bold {
+ font-weight: bold;
+ font-size: 16px;
+}
+
+.color-black {
+ color: #000;
+}
+
+.date {
+ position: absolute;
+ font-size: 14px;
+ padding: 10px;
+ right: 0;
+ width: 100px;
+ color: #969696;
+}
+
+.date_ar {
+ position: absolute;
+ font-size: 14px;
+ padding: 10px;
+ left: 0;
+ width: 100px;
+ color: #969696;
+}
+
+.transaction-list {
+ margin-top: 20px;
+}
+
+.date-container {
+ margin: 0px 20px;
+}
+
+.label {
+ font-size: 16px;
+ // margin-left: 15px;
+ color: #a2a5a6 !important;
+ display: block;
+ overflow: hidden;
+ -webkit-box-flex: 1;
+ -webkit-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+ /* font-size: inherit; */
+ // text-overflow: ellipsis;
+ // white-space: nowrap;
+ white-space: normal;
+ // padding-top: 10px;
+ padding: 5px 0px;
+ padding-left: 10px !important;
+ margin: 10px auto;
+
+ :root[dir="ltr"] {
+ font-family: var(--fontFamilySemiBoldEN) !important;
+ }
+
+ :root[dir="rtl"] {
+ font-family: var(--fontFamilyIOSAR) !important;
+ font-weight: bold;
+ }
+
+
+}
+
+.Field-en {
+ border-radius: 30px;
+ border: 1px solid #a2a5a6 !important;
+ margin-bottom: 15px;
+ padding-left: 20px !important;
+ padding-top: 6px !important;
+ color: #999999 !important;
+}
+
+.Field-ar {
+ border-radius: 30px;
+ border: 1px solid #a2a5a6 !important;
+ margin-bottom: 20px;
+ padding-right: 20px !important;
+ padding-top: 6px !important;
+ color: #999999 !important;
+}
+
+select {
+ width: 300px !important;
+ border: none !important;
+}
+
+.padding_date {
+ padding-left: 5px !important;
+}
+
+.date-icon {
+ font-size: 20px;
+ left: -1px;
+ position: relative;
+ top: 2px;
+}
+
+ion-card {
+ padding: 10px;
+ border-radius: 11px;
+ box-shadow: 0px 1px 2px 1px #ccc;
+}
+
+.display-inline {
+ display: inline-block;
+
+}
+
+.red {
+ color: #CA3332;
+ font-weight: 600;
+ margin: 0px 5px;
+ overflow: hidden;
+ width: 90%;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.inline-display {
+ display: inline-block;
+ font-weight: 600;
+ padding-left: 8px;
+}
+
+.download {
+ font-size: 26px;
+ margin: 0px 10px;
+ position: relative;
+ top: 5px;
+ color: #CA3332;
+}
+
+.refresh {
+ font-size: 22px;
+ margin: 0px 10px;
+ position: relative;
+ top: 5px;
+ color: #CA3332;
+}
+
+.disabled-icon {
+ pointer-events: none;
+ opacity: .5;
+}
+
+.output-container {
+ position: relative;
+ bottom: 10px;
+}
+
+@media screen and (min-width: 300px) {
+ .CreateBtn {
+ --background: var(--newgreen) !important;
+ background: var(--newgreen) !important;
+ white-space: normal;
+ color: var(--light);
+ text-transform: capitalize;
+ min-height: 1.0cm;
+ --border-radius: 7px !important;
+ border-radius: 7px !important;
+ --min-height: 1.6cm !important;
+ width: 315px;
+ font-family: var(--fontFamilyPoppins-SemiBold, inherit);
+ }
+}
+
+@media screen and (min-width: 1px) and (max-width:290px) {
+ .CreateBtn {
+ --background: var(--newgreen) !important;
+ background: var(--newgreen) !important;
+ white-space: normal;
+ color: var(--light);
+ text-transform: capitalize;
+ min-height: 1.0cm;
+ --border-radius: 7px !important;
+ border-radius: 7px !important;
+ --min-height: 1.6cm !important;
+ width: 257px;
+ font-family: var(--fontFamilyPoppins-SemiBold, inherit);
+ }
+}
+
+.footer {
+ padding: 15px 0px;
+ background-color: var(--light) !important;
+ border: 0px !important;
+ box-shadow: none !important;
+ -webkit-box-shadow: none;
+}
+
+.Btn {
+ margin: auto;
+ text-align: center;
+ display: block;
+}
\ No newline at end of file
diff --git a/Mohem/src/app/reports/transactions/transactions.component.spec.ts b/Mohem/src/app/reports/transactions/transactions.component.spec.ts
new file mode 100644
index 00000000..38769453
--- /dev/null
+++ b/Mohem/src/app/reports/transactions/transactions.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TransactionsComponent } from './transactions.component';
+
+describe('TransactionsComponent', () => {
+ let component: TransactionsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ TransactionsComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(TransactionsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/reports/transactions/transactions.component.ts b/Mohem/src/app/reports/transactions/transactions.component.ts
new file mode 100644
index 00000000..9755fb4a
--- /dev/null
+++ b/Mohem/src/app/reports/transactions/transactions.component.ts
@@ -0,0 +1,128 @@
+import { Component, ElementRef, OnInit } from '@angular/core';
+import { FileOpener } from '@ionic-native/file-opener/ngx';
+import { File } from '@ionic-native/file/ngx';
+import { Platform } from '@ionic/angular';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { ReportServiceService } from '../report-service.service';
+
+@Component({
+ selector: 'app-transactions',
+ templateUrl: './transactions.component.html',
+ styleUrls: ['./transactions.component.scss'],
+})
+export class TransactionsComponent implements OnInit {
+ transactionList: any = [];
+ selectedMenu: any;
+ template: any;
+ direction: any;
+ programList: any = [];
+
+ constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener,
+ ) { }
+
+ ngOnInit() {
+
+ this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
+ // this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false);
+ //this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false);
+ this.direction = TranslatorService.getCurrentDirection();
+ this.getConcurrentProgram();
+ }
+ getDate(date) {
+ return this.cs.evaluteDate(date);
+ }
+ getCppOutput(transaction) {
+ var request: any = {
+ P_REQUEST_ID: transaction['REQUEST_ID']
+ };
+ this.cs.startLoading();
+ this.reports.getCppOutput(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
+ this.saveAndOpenPdf(result.GetCcpOutputList['P_OUTPUT_FILE'], 'report.pdf');
+
+ console.log(result);
+ this.cs.stopLoading();
+
+ });
+ }
+ // saveAndOpenPdf(pdf: string, filename: string) {
+
+ // const linkSource = `data:application/pdf;base64,${pdf}`;
+ // const downloadLink = document.createElement("a");
+ // const fileName = "report.pdf";
+ // downloadLink.href = linkSource;
+ // downloadLink.download = fileName;
+ // downloadLink.click();
+
+ // }
+
+ saveAndOpenPdf(pdf: string, filename: string) {
+ const writeDirectory = this.platform.is('ios') ? this.file.dataDirectory : this.file.externalDataDirectory;
+ this.file.writeFile(writeDirectory, filename, this.convertBase64ToBlob(pdf, 'data:application/pdf;base64'), { replace: true })
+ .then(() => {
+ this.opener.open(writeDirectory + filename, 'application/pdf')
+ .catch(() => {
+ console.log('Error opening pdf file');
+ });
+ })
+ .catch(() => {
+ console.error('Error writing pdf file');
+ });
+ }
+
+ convertBase64ToBlob(b64Data, contentType): Blob {
+ contentType = contentType || '';
+ const sliceSize = 512;
+ b64Data = b64Data.replace(/^[^,]+,/, '');
+ b64Data = b64Data.replace(/\s/g, '');
+ const byteCharacters = window.atob(b64Data);
+ const byteArrays = [];
+ for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
+ const slice = byteCharacters.slice(offset, offset + sliceSize);
+ const byteNumbers = new Array(slice.length);
+ for (let i = 0; i < slice.length; i++) {
+ byteNumbers[i] = slice.charCodeAt(i);
+ }
+ const byteArray = new Uint8Array(byteNumbers);
+ byteArrays.push(byteArray);
+ }
+ return new Blob(byteArrays, { type: contentType });
+ }
+ refresh() {
+ // var request: any = {
+ // P_REQUEST_ID: transaction['REQUEST_ID']
+ // };
+ this.cs.startLoading();
+ var request: any = {};
+ request.P_MENU_TYPE = this.selectedMenu.MENU_TYPE;
+ request.P_SELECTED_RESP_ID = -999;
+ request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_NAME;
+ request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME;
+
+ this.reports.getTransaction(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
+ this.cs.stopLoading();
+ this.transactionList = result['GetCcpTransactionsList_New'];
+ });
+ }
+ getConcurrentProgram() {
+ this.cs.startLoading();
+ this.reports.getConcurrentProgram({
+ P_REQUEST_GROUP_ID: this.selectedMenu.REQUEST_GROUP_ID
+ }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
+ this.cs.stopLoading();
+ this.programList = response.GetConcurrentProgramsList;
+
+ })
+ }
+ selectTemplates() {
+ // this.elementRef
+ // .nativeElement.querySelectorAll('#containerDiv')[0].innerHTML = '';
+ if (this.template) {
+ this.refresh();
+ }
+ }
+ createTransaction() {
+ this.cs.openConcurrentReport();
+ }
+}
diff --git a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts
index be177d0f..c0de3bb0 100644
--- a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts
+++ b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts
@@ -7,6 +7,7 @@ import { EitService } from 'src/app/eit/services/eit.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import { HomeComponent } from 'src/app/notification/home/home.component';
import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { BasicRequest } from 'src/app/profile/models/basic.request';
@@ -186,8 +187,10 @@ export class ConfirmTerminationComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
- let msg: string = this.ts.trPK("eit", "approval-message-success");
- this.cs.presentAlert(msg);
+ // let msg: string = this.ts.trPK("eit", "approval-message-success");
+ // this.cs.presentAlert(msg);
+ this.cs.greenToastPK("eit", "approval-message-success");
+ this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage();
}
}
diff --git a/Mohem/src/assets/icon/update.png b/Mohem/src/assets/icon/update.png
deleted file mode 100644
index e461c733..00000000
Binary files a/Mohem/src/assets/icon/update.png and /dev/null differ
diff --git a/Mohem/src/assets/imgs/mohemm-action/Doable.png b/Mohem/src/assets/imgs/mohemm-action/Doable.png
index 36d8fb25..f0ca3153 100644
Binary files a/Mohem/src/assets/imgs/mohemm-action/Doable.png and b/Mohem/src/assets/imgs/mohemm-action/Doable.png differ
diff --git a/Mohem/src/assets/imgs/mohemm-action/ReportGenerated-OLD.png b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated-OLD.png
new file mode 100644
index 00000000..27417cb3
Binary files /dev/null and b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated-OLD.png differ
diff --git a/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png
index 27417cb3..d7d38d22 100644
Binary files a/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png and b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png differ
diff --git a/Mohem/src/assets/imgs/mohemm-action/data-corrected (4).png b/Mohem/src/assets/imgs/mohemm-action/answer.png
similarity index 100%
rename from Mohem/src/assets/imgs/mohemm-action/data-corrected (4).png
rename to Mohem/src/assets/imgs/mohemm-action/answer.png
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json
index 28957b14..e7d2a091 100644
--- a/Mohem/src/assets/localization/i18n.json
+++ b/Mohem/src/assets/localization/i18n.json
@@ -249,6 +249,14 @@
}
},
"general": {
+ "current": {
+ "en": "Current",
+ "ar": "تيار"
+ },
+ "proposed": {
+ "en": "Proposed",
+ "ar": "مقترح"
+ },
"fav-showData": {
"en": "Please select an alphabet to see your favourites",
"ar": "الرجاء تحديد الأبجدية لرؤية المفضلة لديك"
@@ -1030,8 +1038,8 @@
"ar": "واي فاي"
},
"wifi-connection-failed-text": {
- "en": "Failed to validate, please visit the nearest receptions in the branch",
- "ar": "فشل التحقق ، يرجى زيارة أقرب مكتب استقبال في الفرع"
+ "en": "Unexpected WIFI connectivity issue! Please try again OR mark attendance with NFC.",
+ "ar": "مشكلة اتصال واي فاي غير متوقعة! يرجى المحاولة مرة أخرى أو تسجيل الحضور باستخدام خاصية ال NFC"
},
"forget-wifi-connection-text": {
"en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the network from settings.",
@@ -1352,16 +1360,16 @@
"ar": "الوصف"
},
"MyHR-request": {
- "en": "MY HR REQUEST",
- "ar": "طلباتي"
+ "en": "Mowadhafhi Request",
+ "ar": "طلب Mowadhafhi"
},
"createHR-Request": {
- "en": "CREATE HR REQUEST",
- "ar": "انشاء طلب"
+ "en": "Create Mowadhafhi Request",
+ "ar": "انشاء Mowadhafhi طلب"
},
"HR-Request": {
- "en": "HR Request",
- "ar": "HR طلبات"
+ "en": "Mowadhafhi",
+ "ar": "Mowadhafhi"
},
"performance-evaluation": {
"en": "Performance Evaluation",
@@ -3534,7 +3542,7 @@
"ar": "نوع الطلب"
},
"request-generated": {
- "en": "Your Request for resport has been sent to the server, click below link to check status",
+ "en": "Your Request for report has been sent to the server, click below link to check status",
"ar": "تم إرسال طلبك عن التقرير إلى الخادم، انقر فوق الرابط أدناه للتحقق من الحالة"
},
"check-status": {
diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss
index 465f3bfc..02e707e9 100644
--- a/Mohem/src/theme/styles.scss
+++ b/Mohem/src/theme/styles.scss
@@ -1639,4 +1639,14 @@ ion-segment-button {
.select-alert .alert-radio-label{
font-size: 12px !important;
- }
\ No newline at end of file
+ }
+ .modal-image-viewer-landscape {
+ --height: 35% !important;
+ --width: 90% !important;
+ --border-radius: 0.4cm;
+ }
+ .modal-image-viewer-portrait {
+ --height: 45% !important;
+ --width: 60% !important;
+ --border-radius: 0.4cm;
+ }
\ No newline at end of file