Merge branch 'enad-pre-live' of https://gitlab.com/haroon6138/mohemmionic5 into MOE_DEV

SRCA_DEV
Sultan Khan 4 years ago
commit a2f7c869cd

@ -4,8 +4,8 @@
<description>an app created by cloud Solutions</description> <description>an app created by cloud Solutions</description>
<author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">Cloud Solutions</author> <author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">Cloud Solutions</author>
<content src="index.html" /> <content src="index.html" />
<content src="index.html" />
<access origin="*" /> <access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" /> <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> <allow-intent href="https://*/*" />
<allow-intent href="tel:*" /> <allow-intent href="tel:*" />

@ -2,5 +2,6 @@
<network-security-config> <network-security-config>
<domain-config cleartextTrafficPermitted="true"> <domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain> <domain includeSubdomains="true">localhost</domain>
<domain includeSubdomains="true">hmg.com</domain>
</domain-config> </domain-config>
</network-security-config> </network-security-config>

@ -1,5 +1,5 @@
<ion-content style="--background: white;"> <ion-content style="--background: white;" class="biggerPhone">
<div> <div class="rocket-image">
<img src="assets/icon/update_rocket_image.png" style="width: 100%;" /> <img src="assets/icon/update_rocket_image.png" style="width: 100%;" />
</div> </div>
<div style="text-align: center;"> <div style="text-align: center;">

@ -0,0 +1,10 @@
@media only screen and (min-width: 540px) and (max-width: 767px) {
.biggerPhone {
.rocket-image {
img {
height: 350px;
}
}
}
}

@ -29,7 +29,6 @@ export class ConnectorService {
// public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://hmgwebservices.com/'; public static host = 'https://hmgwebservices.com/';
// public static host = 'http://riyt-mohemm1:1010/' //MOE
constructor(public httpClient: HttpClient, constructor(public httpClient: HttpClient,
public cs: CommonService, public cs: CommonService,
private events: Events, private events: Events,

@ -99,8 +99,8 @@
</div> </div>
</div> </div>
</div> </div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="itemType !== ''"> <ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="itemType !== '' && worklistLength >= 25">
<ion-infinite-scroll-content></ion-infinite-scroll-content> <ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> </ion-infinite-scroll>
</ion-content> </ion-content>

@ -80,6 +80,7 @@ export class HomeComponent implements OnInit {
public totalMR = 0; public totalMR = 0;
public totalIC = 0; public totalIC = 0;
public totalStamp = 0; public totalStamp = 0;
public worklistLength = 0;
public showChart = false; public showChart = false;
@ -423,6 +424,7 @@ export class HomeComponent implements OnInit {
} }
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList); this.handleWorkListResult(result.GetWorkList);
} }
} }
@ -589,6 +591,7 @@ export class HomeComponent implements OnInit {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') { if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList); this.handleWorkListResult(result.GetWorkList);
} }
}); });

@ -414,7 +414,7 @@
<ion-tabs> <ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;"> <ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVE')"> <ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVED')">
<img src="../assets/imgs/mohemm-action/Approve.png"> <img src="../assets/imgs/mohemm-action/Approve.png">
<ion-label class="action-btn"> {{approve_label}}</ion-label> <ion-label class="action-btn"> {{approve_label}}</ion-label>
@ -426,7 +426,7 @@
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
<img src="../assets/imgs/mohemm-action/Reject.png"> <img src="../assets/imgs/mohemm-action/Reject.png">
<ion-label class="action-btn"> {{reject_label}}</ion-label> <ion-label class="action-btn"> {{reject_label}}</ion-label>
</ion-tab-button> </ion-tab-button>

@ -497,16 +497,16 @@ export class WorklistMainIcComponent implements OnInit {
checkRequestType(index) { checkRequestType(index) {
if (this.notificationArray[index].REQUEST_TYPE === 'PO') { if (this.notificationArray[index].REQUEST_TYPE === 'PO') {
this.intializeNotificationDetail(); this.common.openWorklistMainPOPage();
} else } else if (this.notificationArray[index].REQUEST_TYPE === 'PR') {
if (this.notificationArray[index].REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage(); this.common.openWorklistMainPRPage();
} else } else if (this.notificationArray[index].REQUEST_TYPE === 'MO') {
if (this.notificationArray[index].REQUEST_TYPE === 'MO') {
this.common.openWorklistMainMRPage(); this.common.openWorklistMainMRPage();
} else { } else if (this.notificationArray[index].REQUEST_TYPE === 'ITEM_CREATION') {
this.intializeNotificationDetail();
} else {
this.common.openWorklistMainPage(); this.common.openWorklistMainPage();
} }
} }
actionButton(action) { actionButton(action) {
@ -544,8 +544,8 @@ export class WorklistMainIcComponent implements OnInit {
// } // }
if ( if (
ButtonAction == "APPROVE" || ButtonAction == "APPROVED" ||
ButtonAction == "REJECT" || ButtonAction == "REJECTED" ||
ButtonAction == "DEL" || ButtonAction == "DEL" ||
ButtonAction == "CLOSE" ButtonAction == "CLOSE"
) { ) {
@ -560,10 +560,10 @@ export class WorklistMainIcComponent implements OnInit {
// this.WorkListActionObj, // this.WorkListActionObj,
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO // WorklistMainPRComponent.PASS_NOTIFICATION_INFO
// ); // );
if (ButtonAction == "APPROVE") { if (ButtonAction == "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
} }
else if (ButtonAction == "REJECT") { else if (ButtonAction == "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
} }
@ -653,7 +653,8 @@ export class WorklistMainIcComponent implements OnInit {
ButtonAction == "TRANSFER" || ButtonAction == "TRANSFER" ||
ButtonAction == "TRANSFER_INFO" || ButtonAction == "TRANSFER_INFO" ||
ButtonAction == "APPROVE_AND_FORWARD" || ButtonAction == "APPROVE_AND_FORWARD" ||
ButtonAction == "FORWARD" ButtonAction == "FORWARD" ||
ButtonAction == "RETURNED"
) { ) {

@ -317,12 +317,12 @@
<ion-row> <ion-row>
<ion-col class="rowBorder" style="background: #269db8;"> <ion-col class="rowBorder" style="background: #269db8;">
<ion-label> <ion-label>
<p style="color: white;">Current</p> <p style="color: white;">{{ 'general, current' | translate}}</p>
</ion-label> </ion-label>
</ion-col> </ion-col>
<ion-col class="rowBorder" style="background: #269db8;"> <ion-col class="rowBorder" style="background: #269db8;">
<ion-label> <ion-label>
<p style="color: white;">Proposed</p> <p style="color: white;">{{ 'general, proposed' | translate}}</p>
</ion-label> </ion-label>
</ion-col> </ion-col>
</ion-row> </ion-row>

@ -54,7 +54,8 @@
<ion-card class="offers-discount-card"> <ion-card class="offers-discount-card">
<ion-card-header> <ion-card-header>
<!-- <img [src]="item.Banner_Image" /> --> <!-- <img [src]="item.Banner_Image" /> -->
<div class="header-img" [ngStyle]="{'background-image': 'url(' + item.Banner_Image + ')'}"></div> <!-- <div [ngStyle]="{'background-image': url(' + + ')'}"></div> -->
<img class="header-img" [src]="sanitize(item.Banner_Image)" />
<ion-card-title *ngIf='direction === "ltr"'>{{item.Title}}</ion-card-title> <ion-card-title *ngIf='direction === "ltr"'>{{item.Title}}</ion-card-title>
<ion-card-title *ngIf='direction === "rtl"'>{{item.Title_AR}}</ion-card-title> <ion-card-title *ngIf='direction === "rtl"'>{{item.Title_AR}}</ion-card-title>
</ion-card-header> </ion-card-header>

@ -39,6 +39,7 @@ export class HomeComponent implements AfterViewInit {
public cs: CommonService, public cs: CommonService,
public offersService: OfferDiscountService, public offersService: OfferDiscountService,
public route: ActivatedRoute, public route: ActivatedRoute,
private sanitizer: DomSanitizer
) { ) {
this.route this.route
@ -218,4 +219,9 @@ export class HomeComponent implements AfterViewInit {
}, 1000); }, 1000);
} }
} }
sanitize(img) {
return this.sanitizer.bypassSecurityTrustUrl(img);
}
} }

@ -14,7 +14,7 @@
<!-- <div class="header-img-main" [ngStyle]="{'background-image': 'url(' + details.Banner_Image + ')'}" ></div> <!-- <div class="header-img-main" [ngStyle]="{'background-image': 'url(' + details.Banner_Image + ')'}" ></div>
--> -->
<image-modal size="big" fontsize="1cm" <image-modal size="big" fontsize="1cm"
[src]="details.Banner_Image"> [src]="sanitize(details.Banner_Image)">
</image-modal> </image-modal>
<ion-card-title *ngIf="direction =='ltr'">{{details.Title}}</ion-card-title> <ion-card-title *ngIf="direction =='ltr'">{{details.Title}}</ion-card-title>
@ -69,8 +69,8 @@
<ion-col size="6" *ngFor="let item of related" (click)="openRelated(item)"> <ion-col size="6" *ngFor="let item of related" (click)="openRelated(item)">
<ion-card class="related-card"> <ion-card class="related-card">
<ion-card-header> <ion-card-header>
<div class="header-img" [ngStyle]="{'background-image': 'url(' + item.Banner_Image + ')'}" ></div> <!-- <div class="header-img" [ngStyle]="{'background-image': 'url(' + sanitize(item.Banner_Image) + ')'}" ></div> -->
<img class="header-img" [src]="sanitize(item.Banner_Image)" />
<ion-card-title>{{item.Title}}</ion-card-title> <ion-card-title>{{item.Title}}</ion-card-title>
</ion-card-header> </ion-card-header>

@ -3,6 +3,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { OfferDiscountService } from '../services/service'; import { OfferDiscountService } from '../services/service';
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { DomSanitizer } from '@angular/platform-browser';
@Component({ @Component({
selector: 'app-offer-details', selector: 'app-offer-details',
templateUrl: './offer-details.component.html', templateUrl: './offer-details.component.html',
@ -12,7 +13,7 @@ export class OfferDetailsComponent implements OnInit {
public details: any; public details: any;
public direction: String; public direction: String;
public related: any; public related: any;
constructor(public ts: TranslatorService, private socialSharing: SocialSharing, public cs: CommonService, public offersService: OfferDiscountService) { } constructor(public ts: TranslatorService, private socialSharing: SocialSharing, public cs: CommonService, public offersService: OfferDiscountService, private sanitizer: DomSanitizer) { }
ngOnInit() { ngOnInit() {
this.direction = TranslatorService.getCurrentDirection(); this.direction = TranslatorService.getCurrentDirection();
@ -68,4 +69,8 @@ export class OfferDetailsComponent implements OnInit {
this.openLocation(); this.openLocation();
}) })
} }
sanitize(img) {
return this.sanitizer.bypassSecurityTrustUrl(img);
}
} }

@ -44,7 +44,7 @@
<div class="output-container" > <div class="output-container" >
<p class="color-black display-inline">{{'transaction,output' | translate}}</p> <p class="color-black display-inline">{{'transaction,output' | translate}}</p>
<p class="display-inline" (click)="getCppOutput(transaction)" [ngClass]="transaction.CCP_PHASE =='Running' || transaction.CCP_PHASE =='Pending'? 'disabled-icon' : '' " ><ion-icon name="download" class="download"></ion-icon></p> <p class="display-inline" (click)="getCppOutput(transaction)" [ngClass]="transaction.CCP_PHASE =='Running' || transaction.CCP_PHASE =='Pending'? 'disabled-icon' : '' " ><ion-icon name="download" class="download"></ion-icon></p>
<p class="display-inline" (click)="refresh(transaction)" *ngIf="transaction.CCP_PHASE =='Running' || transaction.CCP_PHASE =='Pending'"><ion-icon name="refresh" class="refresh" > </ion-icon></p> <p class="display-inline" (click)="refresh()" *ngIf="transaction.CCP_PHASE =='Running' || transaction.CCP_PHASE =='Pending'"><ion-icon name="refresh" class="refresh" > </ion-icon></p>
</div> </div>
</ion-label> </ion-label>

@ -249,6 +249,14 @@
} }
}, },
"general": { "general": {
"current": {
"en": "Current",
"ar": "تيار"
},
"proposed": {
"en": "Proposed",
"ar": "مقترح"
},
"fav-showData": { "fav-showData": {
"en": "Please select an alphabet to see your favourites", "en": "Please select an alphabet to see your favourites",
"ar": "الرجاء تحديد الأبجدية لرؤية المفضلة لديك" "ar": "الرجاء تحديد الأبجدية لرؤية المفضلة لديك"

Loading…
Cancel
Save