update and change address, design updates

MOHEMM-SFH-COLORS
Sultan Khan 4 years ago
parent 76231343c9
commit a0f5beb4df

@ -28,7 +28,7 @@ export class ConnectorService {
public static timeOut = 120 * 1000;
public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
//public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient,
public cs: CommonService,

@ -1,11 +1,11 @@
<div feedback class="custom-button">
<div class="iconBox">
<img *ngIf="title !='Announcement' && title !='اعلان' && title !='Items for sale' && title !='بضاعه للبع' && title !='العروض والخصومات' && title !='Offers & Discount' && title != 'My Team' && title != 'Vacation Rule' && title != 'فريقي' && title != 'الإنابة بالإجازات' " [src]="'data:image/png;base64,'+icon" class="icon">
<img *ngIf="title !='Announcement' && title !='اعلان' && title !='Items For Sale' && title !='بضاعه للبع' && title !='العروض والخصومات' && title !='Offers & Discount' && title != 'My Team' && title != 'Vacation Rule' && title != 'فريقي' && title != 'الإنابة بالإجازات' " [src]="'data:image/png;base64,'+icon" class="icon">
<!-- <img *ngIf="title == 'My Team' || title == 'Vacation Rule'" [src]="icon" class="icon"> -->
<img *ngIf="title == 'My Team' || title == 'فريقي' " [src]="myTeamIcon" class="icon">
<img *ngIf="title == 'Vacation Rule' || title == 'الإنابة بالإجازات'" [src]="vacationRuleIcon" class="icon">
<img *ngIf="title =='Items for sale' || title=='بضاعه للبع'" src="/assets/icon/home/item_for_sale.png" class="icon" style="height:40px" />
<img *ngIf="title =='Items For Sale' || title=='بضاعه للبع'" src="/assets/icon/home/item_for_sale.png" class="icon" style="height:40px" />
<img *ngIf="title =='Offers & Discount' || title =='العروض والخصومات'" src="/assets/icon/home/offers_discount.png" class="icon" style="height:40px" />
<img *ngIf="title =='Announcement' || title =='اعلان'" src="/assets/icon/home/announcementIntegration.png" class="icon" style="height:40px" />

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

@ -17,14 +17,15 @@
<div class="header"></div>
<div class="bottom"></div>
<div class="md-stepper-horizontal ">
<div class="md-step active " [ngClass]="step >1 ? 'green' : 'orange'">
<ion-col size="4"> <div class="md-step active " [ngClass]="step >1 ? 'green' : 'orange'">
<div class="md-step-circle"><span style="content: url(/assets/imgs/check-white.svg)"></span></div>
<div class="md-step-title">{{ts.trPK('itemforsale','select-category')}}</div>
<div class="md-step-optional">{{ts.trPK('itemforsale','completed')}}</div>
<div class="md-step-bar-left"></div>
<!-- <div class="md-step-bar-right" [ngClass]="step ==1 ? 'orange-border' : 'green-border'"></div> -->
</div>
<div class="md-step" [ngClass]="step >2 ? 'green' : step ==2 ? 'orange' : 'grey'">
</ion-col>
<ion-col size="4"> <div class="md-step" [ngClass]="step >2 ? 'green' : step ==2 ? 'orange' : 'grey'">
<div class="md-step-circle"><span *ngIf="step==1" style="content: url(/assets/imgs/check.svg)"></span>
<span *ngIf="step>2 || step==2" style="content: url(/assets/imgs/check-white.svg)">
</span>
@ -34,15 +35,15 @@
<div class="md-step-optional">{{step >2 ? "Completed" : "Locked"}}</div>
<div class="md-step-bar-left"></div>
</div>
<div class="md-step" [ngClass]="step >3 ? 'green' : step ==3 ? 'orange' : 'grey'">
</div></ion-col>
<ion-col size="4"><div class="md-step" [ngClass]="step >3 ? 'green' : step ==3 ? 'orange' : 'grey'">
<div class="md-step-circle"><span *ngIf="step==1 || step==2" style="content: url(/assets/imgs/check.svg)"></span>
<span *ngIf="step>=3" style="content: url(/assets/imgs/check-white.svg)"></span></div>
<div class="md-step-title">{{ts.trPK('itemforsale','review-sell')}}</div>
<div class="md-step-optional">{{step >3 ? "Completed" : "Locked"}}</div>
<div class="md-step-bar-left"></div>
</div>
</div></ion-col>
</div>
<div class="content">
@ -236,7 +237,7 @@
<strong>Selling for </strong> <h2>500 SAR</h2>
</div>
<div class="waring">
<ion-icon name="help-circle"></ion-icon> This ad will be valid for 2 week after approval
<img src="/assets/imgs/itemsforsale/alert.svg"> This ad will be valid for 2 week after approval
</div>
</div>

@ -12,7 +12,7 @@
.md-stepper-horizontal .md-step {
display:table-cell;
position:relative;
padding:20px;
padding:20px 15px;
text-align: left;
}
.md-stepper-horizontal .md-step:hover,
@ -33,11 +33,11 @@
.md-stepper-horizontal .md-step:hover .md-step-circle {
background-color:#757575;
}
.md-stepper-horizontal .md-step:last-child .md-step-bar-left {
.md-stepper-horizontal ion-col:last-child .md-step-bar-left {
display:none;
}
.md-stepper-horizontal .md-step .md-step-circle {
width: 30px;
width: 30px;
height: 30px;
border-radius: 50%;
text-align: center;
@ -45,6 +45,7 @@
font-size: 16px;
font-weight: 600;
color: #FFFFFF;
z-index: 3;
}
.md-stepper-horizontal .md-step:last-child .md-step-circle {
margin-left:20px
@ -106,28 +107,25 @@ margin-left:20px
top: 36px;
height: 2px;
background: #DDDDDD;
width: 80px;
}
.md-stepper-horizontal .md-step .md-step-bar-right {
right:0;
left:50%;
margin-left:20px;
width: 95%;
z-index: 0;
}
.md-stepper-horizontal .md-step .md-step-bar-left {
margin-right: 0px;
left: 55px
margin-right: 0px;
left: 58%;
}
.orange .md-step-bar-left {
background:#CC9B14 !important;
font-weight: bold;
}
.green .md-step-bar-left {
background:#1FA169 !important;
font-weight: bold;
}
.header{
height: 150px;
height: 15%;
width: 100%;
position: absolute;
background: #259CB8;
top: 0;
@ -136,17 +134,17 @@ background:#CC9B14 !important;
--background: #259CB8 !important;
}
.bottom{
height: 88%;
height: 85%;
width: 100%;
position: absolute;
background: #F5F5F5;
top: 20%;
top: 15%;
}
.md-step-optional{
font-size: 12px;
background: #cccccc;
color: #ffffff !important;
padding: 2px;
padding: 2px 5px 2px 5px;
border-radius: 5px;
margin: 5px;
}
@ -154,14 +152,14 @@ background:#CC9B14 !important;
font-size: 12px;
background: #CC9B14;
color: #ffffff !important;
padding: 2px;
padding:2px 5px 2px 5px;
border-radius: 5px;
}
.green .md-step-optional{
font-size: 12px;
background-color:#00AE4D;
color: #ffffff !important;
padding: 3px 5px 3px 5px;
padding: 2px 5px 2px 5px;
border-radius: 5px;
}
.green .md-step-circle{
@ -190,21 +188,24 @@ margin-bottom: 70px;
.sale-icon{
box-shadow: 1px 1px 5px 1px #cccc;
padding: 10px;
margin: 1px;
margin: 2px;
border-radius: 15px;
background: #fff;
height: 115px;
position: relative;
}
.sale-icon ion-icon{
font-size: 35px;
}
.sale-icon p{
margin-top:5px;
margin-top: 5px;
margin-bottom: 0;
font-size: 14px;
font-size: 12px;
font-weight: bold;
position: absolute;
bottom: 10px;
text-align: left;
padding: 5px;
}
.add-details{
background: #fff;
@ -219,8 +220,8 @@ margin-bottom: 70px;
padding: 5px;
}
.add-details p{
font-weight: bold;
font-size: 18px;
font-weight: normal;
font-size: 12px;
}
.add-details ion-label{
margin: 10px;
@ -259,17 +260,29 @@ position: relative;
width: 80%;
}
.description-details .orange{
color:orange
color: #CC9B14;
font-weight: bold;
font-size: 14px;
}
.description-details img{
margin:10px;
}
.waring{color: red;
.waring{
color: #CA3332;
padding: 10px;
font-size: 14px;}
font-size: 10px;
}
.waring img{
margin: 0 10px;
}
.selling h2{
display: inline-block;
font-weight: bolder;
font-size: 25px;
}
.selling strong{
font-size: 14px;
}
.flaot-button{float:right;margin:30px}
.orange-border{
@ -280,6 +293,7 @@ border-top:2px solid #CC9B14;
}
.md-step span{
position: relative;
z-index: 2;
}
.red-button{
--background:#CA3332;
@ -300,7 +314,7 @@ ion-footer{
}
.review-title{
font-size: 16px;
font-size: 14px;
font-weight: bold;
}
.camera-icon{
@ -312,4 +326,8 @@ ion-footer{
top: 60px;
bottom: 0;
color: #259CB8;
}
}
.top img{
position: absolute;
top: 15px;
}

@ -21,7 +21,7 @@
<div class="sales-items" *ngIf="segment =='1'">
<div class="fab-button">
<ion-fab-button class="flaot-button" (click)="openSale()"><ion-icon name="add"></ion-icon></ion-fab-button>
<ion-fab-button class="flaot-button" (click)="openSale()"><img src="assets/imgs/itemsforsale/add.svg"></ion-fab-button>
</div>
<ion-grid>
<ion-row>
@ -107,7 +107,7 @@
</strong>
</ion-col>
<ion-col size="2">
<ion-icon name="arrow-round-forward"></ion-icon>
<img src="assets/imgs/itemsforsale/arrow.svg">
</ion-col>
</ion-row>
@ -134,7 +134,7 @@
</strong>
</ion-col>
<ion-col size="2">
<ion-icon name="arrow-round-forward"></ion-icon>
<img src="assets/imgs/itemsforsale/arrow.svg">
</ion-col>
</ion-row>
@ -147,7 +147,7 @@
<div class="my-ads" *ngIf="segment =='2'">
<ion-row>
<ion-item button>
<ion-item button detail="false">
<ion-thumbnail slot="start">
<img src="https://ii1.pepperfry.com/media/catalog/product/r/o/568x625/royal-wing-chair-in-blue-color-by-dreamzz-furniture-royal-wing-chair-in-blue-color-by-dreamzz-furnit-6hcjya.jpg" />
</ion-thumbnail>

@ -18,10 +18,7 @@
}
.SearchtextBox{
margin: 10px;
border-radius: 50px;
}
.filterText{
margin: 5px 15px 15px;
font-size: 18px;
@ -71,16 +68,42 @@ ion-card-header img{
ion-card-title{
font-weight: bold;
font-size: 18px;
padding: 5px;
font-size: 14px;
padding: 5px
}
.orange{
color: orange;
color: #CC9B14;
font-weight: bold;
}
.green{
color:#1FA169;
font-weight: bold;
}
ion-card-content p{
margin-left: 0;
margin-right: 0;
margin-top: 15px;
margin-bottom: 0px;
font-size: 12px;
font-weight: bold;
}
.my-ads ion-item{
margin: 10px;
--border-radius: 10px;
padding: 15px 10px 0px 10px;
width: 100%;
}
.my-ads ion-thumbnail img{
position: relative;
top: -10px;
border-radius: 6px;
}
.my-ads .details-text{
font-size: 11px;
}
.my-ads .yellow, .my-ads .green{
font-size: 11px;
}
ion-segment-button{
--background-checked: #000;
--indicator-color : transparent!important;
@ -89,6 +112,8 @@ ion-segment-button{
ion-segment-button ion-label{
padding: 0;
font-size: 16px;
white-space: normal;
font-weight: bold;
}
.segment-button-checked ion-label{
color: #fff !important;
@ -96,16 +121,16 @@ color: #fff !important;
.segment-button-checked{
background: rgb(46, 46, 46);
}
ion-item{
ion-item.SearchtextBox{
--background: #fff;
margin: 10px;
border-radius: 25px;
--border-radius: 100px;
padding: 5px;
}
ion-item h3{
color: #000;
font-weight: bold;
font-size: 16px;
font-size: 14px;
}
.yellow{
color:#CC9B14;
@ -113,7 +138,7 @@ ion-item h3{
}
ion-item .icon{
margin: 5px;
margin: 5px 0px;
}
.edit{
position: absolute;
@ -161,6 +186,7 @@ ion-card{
}
ion-card-content{
padding: 0 15px 10px 15px;
font-size: 11px;
}
.label-thumb h2{
font-size: 14px;
@ -174,6 +200,7 @@ ion-card-content{
right: 0;
font-size: 10px;
margin: 5px;
padding: 0px 5px;
}
.details-text{
white-space: normal;
@ -181,3 +208,11 @@ ion-card-content{
ion-card-content ion-icon{
font-size: 25px;
}
ion-card-content strong{
margin-left: -5px;
font-size: 16px;
}
ion-fab-button{
height: 60px;
width: 60px;
}

@ -50,18 +50,18 @@
<ion-row>
<ion-col size="6" *ngFor="let item of offersData" (click)="openDetails(item)">
<ion-card>
<ion-card class="offers-discount-card">
<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>
<ion-card-title>{{item.Title}}</ion-card-title>
</ion-card-header>
<ion-card-content>
<div [innerHTML]="getDotted(item.Description)"></div>
<strong class="dark">
{{item.Discount}} {{ts.trPK('general','discount')}}
</strong>
<div class="dark offers-title">
{{item.Discount}}
</div>
<ion-row [class]="checkDate(item['End Date']) ==true ? 'green' : 'red'">
<ion-col size="10" *ngIf="checkDate(item['End Date']) ==true">
<p class="offer-valid">{{ts.trPK('general','offer-valid')}}</p>
@ -69,8 +69,8 @@
<ion-col size="10" *ngIf="checkDate(item['End Date']) ==false">
<p class="offer-valid"> {{ts.trPK('general','expired')}}</p>
</ion-col>
<ion-col size="2" *ngIf="checkDate(item['End Date']) ==false">
<ion-icon name="arrow-round-forward" class="arrow-icon"></ion-icon>
<ion-col size="2" >
<img src="assets/imgs/itemsforsale/arrow.svg">
</ion-col>
</ion-row>

@ -54,9 +54,8 @@
margin-top: 0px;
margin-bottom: 5px;
text-transform: capitalize;
font-size: 17px;
text-align: center;
font-size: 14px;
font-size: 10px;
text-align: left;
}
.bottom-icon{
@ -69,16 +68,27 @@
ion-card-header{
background: #fff;
}
ion-card-header img{
margin: 15px auto;
border-radius: 6px;
height: 150px;
// ion-card-header img{
// margin: 15px auto;
// border-radius: 6px;
// max-height: 80px;
// min-height: 50px;
// }
.header-img{
height: 120px;
width: 100%;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
margin-top: 5px;
}
ion-card-title{
font-weight: bold;
font-size: 18px;
padding: 5px;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 5px;
}
.orange{
color: orange;
@ -119,9 +129,19 @@ margin: 5px;
margin-left:20px !important;
}
.offer-valid{
margin: 2px 0px 5px -3px;
font-size: 14px;
font-weight: bold;
margin:2px;
}
.offers-title{
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-top: 20px;
font-weight: bold;
font-size: 14px !important;
}
.active .top::before{
position: absolute;

@ -97,7 +97,15 @@ export class HomeComponent implements AfterViewInit {
return new Date(date) >= new Date()
}
getDotted(temp) {
return temp.substring(0, 60) + " ...";
temp = this.stripHtml(temp);
return temp.substring(0, 70) + " ...";
}
stripHtml(html) {
var temporalDivElement = document.createElement("div");
temporalDivElement.innerHTML = html;
return temporalDivElement.textContent || temporalDivElement.innerText || "";
}
search(t) {

@ -11,7 +11,8 @@
<div>
<ion-card>
<ion-card-header>
<img [src]="details.Banner_Image" />
<div class="header-img-main" [ngStyle]="{'background-image': 'url(' + details.Banner_Image + ')'}" ></div>
<ion-card-title *ngIf="direction =='ltr'">{{details.Title}}</ion-card-title>
@ -26,18 +27,16 @@
<ion-col size="10" *ngIf="checkDate(details['End Date']) ==true">
<p class="offer-valid">{{ts.trPK('general','offer-valid')}}</p>
</ion-col>
<ion-col size="10">
<ion-col size="10" *ngIf="checkDate(details['End Date']) ==false">
<p class="offer-valid"> {{ts.trPK('general','expired')}}</p>
</ion-col>
<ion-col size="2" *ngIf="checkDate(details['End Date']) ==false">
</ion-col>
</ion-row>
<ion-row>
<ion-col size="10">
<h1> {{details.Discount}} {{ts.trPK('general','discount')}}</h1>
<h1> {{details.Discount}} </h1>
</ion-col>
<ion-col size="2">
<div class="right-align">
@ -62,16 +61,17 @@
<ion-col size="6" *ngFor="let item of related">
<ion-card class="related-card">
<ion-card-header>
<img [src]="item.Banner_Image" />
<div class="header-img" [ngStyle]="{'background-image': 'url(' + item.Banner_Image + ')'}" ></div>
<ion-card-title>{{item.Title}}</ion-card-title>
</ion-card-header>
<ion-card-content>
<div [innerHTML]="getDotted(item.Description)" class='description'></div>
<strong class="dark">
{{item.Discount}} {{ts.trPK('general','discount')}}
</strong>
<div class="dark offers-title">
{{item.Discount}}
</div>
<ion-row [class]="checkDate(item['End Date']) ==true ? 'green' : 'red'">
<ion-col size="10" *ngIf="checkDate(item['End Date']) ==true">
@ -80,8 +80,8 @@
<ion-col size="10" *ngIf="checkDate(item['End Date']) ==false">
<p class="offer-valid"> {{ts.trPK('general','expired')}}</p>
</ion-col>
<ion-col size="2" *ngIf="checkDate(item['End Date']) ==false">
<ion-icon name="arrow-round-forward" class="arrow-icon"></ion-icon>
<ion-col size="2" >
<img src="assets/imgs/itemsforsale/arrow.svg">
</ion-col>
</ion-row>

@ -25,7 +25,10 @@ ion-card-header{
height: 170px;
}
.related-offers-container ion-card-header img{
height: 150px;
margin: 15px auto;
border-radius: 6px;
max-height: 80px;
min-height: 50px;
}
.content-bottom{
padding: 0px 0px 10px;
@ -66,7 +69,11 @@ ion-card-content p{
margin:5px;
}
.related-card ion-card-title{
font-size: 16px;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 5px;
}
.related-offers{
position: relative;
@ -74,8 +81,9 @@ ion-card-content p{
font-size: 18px;
}
.description{
height: 55px;
height: 30px;
overflow: hidden;
font-size: 11px;
}
ion-card{
margin: 20px;
@ -89,6 +97,16 @@ ion-card{
--border-radius: 53px;
border-radius: 10px;
}
.offers-title{
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-top: 20px;
font-weight: bold;
font-size: 14px !important;
}
.red{
color: #de1717;
font-weight: bold;
@ -103,4 +121,24 @@ ion-card{
font-size: 25px;
position: absolute;
bottom: 6px;
}
.header-img{
height: 120px;
width: 100%;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
margin-top: 5px;
}
.header-img-main{
height: 170px;
width: 100%;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
}
.offer-valid{
margin: 2px 0px 5px -3px;
font-size: 14px;
font-weight: bold;
}

@ -24,7 +24,15 @@ export class OfferDetailsComponent implements OnInit {
return new Date(date) >= new Date()
}
getDotted(temp) {
return temp.substring(0, 75) + " ...";
temp = this.stripHtml(temp);
return temp.substring(0, 100) + " ...";
}
stripHtml(html) {
var temporalDivElement = document.createElement("div");
temporalDivElement.innerHTML = html;
return temporalDivElement.textContent || temporalDivElement.innerText || "";
}
share() {
this.socialSharing.share(this.details.Description, this.details.Title, this.details.Banner_Image)

@ -9,15 +9,18 @@
<ion-content padding>
<ion-item class="country dynamicField" lines="none">
<ion-item class="country dynamicField" lines="none" *ngIf="!isUpdate">
<ion-label> {{ts.trPK('general','country')}}</ion-label>
<ion-select value="brown" okText="Okay" cancelText="Dismiss" [(ngModel)]="country">
<ion-select-option [value]="country.COUNTRY_CODE" *ngFor="let country of countries">{{country.COUNTRY_NAME}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item class="country dynamicField" lines="none">
<ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==true">
<ion-label>{{selectedCountryName}}</ion-label>
</ion-item>
<ion-item class="country dynamicField" lines="none" *ngIf="isUpdate ==false">
<ion-label> Effective Date</ion-label>
<ion-datetime [(ngModel)]="effectiveDate" min="1900" max="2100" displayFormat="DD/MM/YYYY " placeholder="MM/DD/YYYY"
></ion-datetime>

@ -74,7 +74,11 @@ export class AddAddressComponent implements OnInit {
addEITData: any;
direction: string;
country: any = 'SA';
selectedCountryName: any;
public effectiveDate: any;
public submitAbsObjList: any = [];
public isUpdate: boolean;
constructor(
public modalController: ModalController,
public cs: CommonService,
@ -137,8 +141,17 @@ export class AddAddressComponent implements OnInit {
ngAfterViewInit() {
console.log("ngAfterViewInit");
// console.log(this.containerDiv.nativeElement);
var addressEntries = this.cs.sharedService.getSharedData(ProfileService.ADRESS_ENTRIES);
if (addressEntries && addressEntries.UPDATE_BUTTON === 'Y') {
this.isUpdate = true;
let countryDetail = this.cs.sharedService.getSharedData(ProfileService.COUNTRY);
this.selectedCountryName = countryDetail.name;
this.country = countryDetail.code;
}
this.getEitDffStructure();
// this.addFieldToDOM(this.buttonInput, 'btnSubmit', this.cs.presentAlert('Clicked!'), true)
this.getCountires();
this.effectiveDate = new Date();
}
@ -161,6 +174,10 @@ export class AddAddressComponent implements OnInit {
if (result.GetAddressDffStructureList != null) {
this.eitResponse = result.GetAddressDffStructureList;
this.drawEitFields(result.GetAddressDffStructureList);
if (this.isUpdate) {
this.submitAbsObjList = this.cs.sharedService.getSharedData(ProfileService.EMP_ADDRESS);
this.fillAbsStructure();
}
}
}
@ -1636,5 +1653,69 @@ export class AddAddressComponent implements OnInit {
this.countries = result['GetCountriesList'];
})
}
fillAbsStructure() {
for (let i = 0; i < this.submitAbsObjList.length; i++) {
let val: any;
if (this.submitAbsObjList[i].VARCHAR2_VALUE)
val = this.submitAbsObjList[i].VARCHAR2_VALUE;
else if (this.submitAbsObjList[i].DATE_VALUE)
val = this.submitAbsObjList[i].DATE_VALUE;
else if (this.submitAbsObjList[i].NUMBER_VALUE)
val = this.submitAbsObjList[i].NUMBER_VALUE;
const elem = document.getElementById(
this.submitAbsObjList[i].APPLICATION_COLUMN_NAME
) as HTMLInputElement;
//obj.transactionNo=this.submitAbsObjList[i].TRANSACTION_NUMBER;
if (elem) {
if (val) {
let feldDetails = this.eitResponse.find(
x =>
x.APPLICATION_COLUMN_NAME ==
this.submitAbsObjList[i].APPLICATION_COLUMN_NAME
);
if (feldDetails) {
let isStandardDate = this.isStandardDateVal(feldDetails);
let isStandardDateTime = this.isStandardDateTimeVal(feldDetails);
let isStandardTime = this.isStandardTimeVal(feldDetails);
if (isStandardDate) {
//elem.value = this.common.reverseFormatDate(val);
} else if (isStandardDateTime) {
// elem.innerHTML = this.common.reverseFormatStandardDate(val);
// elem.dataset.dtvalue = this.common.reverseFormatStandardDate(val);
} else if (isStandardTime) {
elem.innerHTML = val;
elem.dataset.dtvalue = val;
} else {
elem.value = val;
elem.setAttribute("value", elem.value);
}
if (
feldDetails.DISPLAY_FLAG == "N" ||
(feldDetails.VALIDATION_TYPE != "N" &&
feldDetails.READ_ONLY == "Y")
) {
elem.dataset.colmText = val;
elem.value = this.submitAbsObjList[i].SEGMENT_VALUE_DSP;
elem.setAttribute("value", elem.value);
}
}
elem.dataset.hiddenval = val; //hide the value to set it after calling get value set
if (
feldDetails.CHILD_SEGMENTS_VS_Splited &&
feldDetails.CHILD_SEGMENTS_VS_Splited.length > 0
) {
let listArray: any = feldDetails.CHILD_SEGMENTS_VS_Splited;
listArray.forEach(element => {
this.getValueSet(element);
});
}
//var event = new Event('change');
//elem.dispatchEvent(event);
}
} else {
}
}
//this.ExtraObj=obj;
}
}

@ -196,7 +196,7 @@
<ion-col size="2" *ngIf="addressSubMenu && addressSubMenu.UPDATE_BUTTON === 'Y'" (click)="allowEdit('address')">
<img style="width: 70%;" src="../assets/imgs/profile-icons/editing@2x.png"
(click)="allowEdit('address')">
>
</ion-col>
<ion-col size="2" *ngIf="addressSubMenu && addressSubMenu.ADD_BUTTON === 'Y'" (click)="allowEdit('address')">
<ion-icon class="add-icon-styling" name="add"></ion-icon>

@ -48,7 +48,7 @@ export class HomeComponent implements OnInit {
public poBox: any;
public city: any;
public postalCode: any;
public country: any;
public employeeAdress: any = [];
constructor(
public ts: TranslatorService,
@ -91,7 +91,7 @@ export class HomeComponent implements OnInit {
ngOnInit() {
this.getProfile();
this.menuEntries = this.cs.sharedService.getSharedData('menuEntries', false);
this.menuEntries = this.cs.sharedService.getSharedData('menuEntries', false);
if (this.menuEntries) {
this.setMenuEntries();
}
@ -101,14 +101,14 @@ export class HomeComponent implements OnInit {
let personalInformationChildren: any;
let personalInfoNestedChildren: any;
if (this.targetValue === 'sideMenu') {
for( let i = 0; i < this.menuEntries.length; i++ ) {
if (this.targetValue === 'sideMenu') {
for (let i = 0; i < this.menuEntries.length; i++) {
if (this.menuEntries[i].MENU_NAME === 'MBL_E_PROFESSIONALS_01') {
personalInformationChildren = this.menuEntries[i].children;
for( let j = 0; j < personalInformationChildren.length; j++ ) {
for (let j = 0; j < personalInformationChildren.length; j++) {
if (personalInformationChildren[j].MENU_NAME = 'MBL_PERINFO_SS' && personalInformationChildren[j].ENTRY_SEQUENCE === 15) {
personalInfoNestedChildren = personalInformationChildren[j].children;
for( let k = 0; k < personalInfoNestedChildren.length; k++ ) {
for (let k = 0; k < personalInfoNestedChildren.length; k++) {
if (personalInfoNestedChildren[k].REQUEST_TYPE === 'BASIC_DETAILS') {
this.basicDetailsSubMenu = personalInfoNestedChildren[k];
}
@ -122,7 +122,7 @@ export class HomeComponent implements OnInit {
}
} else {
const menuEntriesLocalArray: any = this.menuEntries.children;
for( let i = 0; i < menuEntriesLocalArray.length; i++ ) {
for (let i = 0; i < menuEntriesLocalArray.length; i++) {
if (menuEntriesLocalArray[i].REQUEST_TYPE === 'BASIC_DETAILS') {
this.basicDetailsSubMenu = menuEntriesLocalArray[i];
}
@ -190,6 +190,7 @@ export class HomeComponent implements OnInit {
this.profileService.getEmployeeAddress(body).subscribe((result) => {
console.log(result);
this.employeeAdress = result.GetEmployeeAddressList;
this.country = { name: result.P_COUNTRY_NAME, code: result.P_COUNTRY_CODE }
for (let i = 0; i < this.employeeAdress.length; i++) {
if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'ADDRESS_LINE1') {
this.address = this.employeeAdress[i].SEGMENT_VALUE_DSP;
@ -199,9 +200,9 @@ export class HomeComponent implements OnInit {
this.area = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_3') {
this.poBox = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'TOWN_OR_CITY') {
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'TOWN_OR_CITY') {
this.city = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'POSTAL_CODE') {
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'POSTAL_CODE') {
this.postalCode = this.employeeAdress[i].SEGMENT_VALUE_DSP;
}
}
@ -268,7 +269,7 @@ export class HomeComponent implements OnInit {
}
}
public allowEdit(allowVal: string){
public allowEdit(allowVal: string) {
let selMenu: MenuResponse = new MenuResponse();
selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
@ -281,7 +282,7 @@ export class HomeComponent implements OnInit {
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: undefined, transNo: this.transactionNo }, 'AddEITData');
this.cs.openAddBasicDetails();
} else {
this.cs.openAddAddress();
this.openAddAddress();
}
}
@ -301,6 +302,21 @@ export class HomeComponent implements OnInit {
component: EditDetailProfileComponent,
cssClass: 'my-custom-modal-css'
});
modal.onDidDismiss()
.then((data) => {
console.log(data);
if (data.data && data.data.data == 1) {
this.cs.sharedService.setSharedData(this.addressSubMenu, ProfileService.ADRESS_ENTRIES);
this.cs.sharedService.setSharedData(this.employeeAdress, ProfileService.EMP_ADDRESS);
this.cs.sharedService.setSharedData(this.country, ProfileService.COUNTRY);
this.cs.openAddAddress();
} else if (data.data && data.data.data == 2) {
this.cs.openAddAddress();
}
})
return await modal.present();
}
@ -309,7 +325,14 @@ export class HomeComponent implements OnInit {
}
public openAddAddress() {
this.cs.openAddAddress();
if (this.addressSubMenu && this.addressSubMenu.UPDATE_BUTTON === 'Y') {
this.presentModal();
} else {
this.cs.openAddAddress();
}
}
}

@ -5,7 +5,7 @@
</ion-label>
<ion-list>
<ion-radio-group value="1">
<ion-radio-group [(ngModel)]="isChange">
<ion-item lines="none">
<ion-label >
@ -27,11 +27,11 @@
<ion-grid>
<ion-row>
<ion-col>
<ion-button style=" width: 90%; background: white; --background: #b4b4b4">{{ts.trPK('eit','cancel-text')}}</ion-button>
<ion-button style=" width: 90%; background: white; --background: #b4b4b4" (click)="dismiss()">{{ts.trPK('eit','cancel-text')}}</ion-button>
</ion-col>
<ion-col>
<ion-button style=" width: 90%; background: white; --background: #269db8">{{ts.trPK('general','next')}}</ion-button>
<ion-button style=" width: 90%; background: white; --background: #269db8" (click)="dismiss()" [disabled]="!isChange">{{ts.trPK('general','next')}}</ion-button>
</ion-col>
</ion-row>
</ion-grid>

@ -8,22 +8,23 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
styleUrls: ['./edit-detail-profile.component.scss'],
})
export class EditDetailProfileComponent implements OnInit {
public isChange: any;
constructor(
public modalController: ModalController,
public ts: TranslatorService,
) { }
) { }
colorRadio = "#269db8"
ngOnInit() {}
ngOnInit() { }
dismiss() {
// using the injected ModalController this page
// can "dismiss" itself and optionally pass back data
this.modalController.dismiss({
'dismissed': true
'dismissed': true,
data: this.isChange
});
}

@ -31,6 +31,9 @@ export class ProfileService {
public static getDiffStructure = "Services/ERP.svc/REST/GET_ADDRESS_DFF_STRUCTURE"
public static submitAddressTransactions = "Services/ERP.svc/REST/SUBMIT_ADDRESS_TRANSACTION"
public static ADRESS_ENTRIES = 'address-entries';
public static EMP_ADDRESS = 'emp-address';
public static COUNTRY = 'country';
constructor(
public con: ConnectorService,
public authService: AuthenticationService

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="17.49" height="14.869" viewBox="0 0 17.49 14.869">
<path id="Path_4503" data-name="Path 4503" d="M17.336,51.609,9.663,38.883a1.072,1.072,0,0,0-1.835,0L.154,51.609a1.072,1.072,0,0,0,.918,1.625H16.418a1.072,1.072,0,0,0,.918-1.625ZM8.751,42.767a.726.726,0,0,1,.814.689c0,1.345-.158,3.277-.158,4.622,0,.35-.384.5-.655.5-.362,0-.667-.147-.667-.5,0-1.345-.158-3.277-.158-4.622C7.926,43.016,8.287,42.767,8.751,42.767Zm.011,8.328a.87.87,0,1,1,.859-.87A.883.883,0,0,1,8.762,51.095Z" transform="translate(0 -38.365)" fill="#ca3332"/>
</svg>

After

Width:  |  Height:  |  Size: 580 B

@ -218,7 +218,7 @@
"ar": "خدمات أخرى"
},
"items-sales": {
"en": "Items for sale",
"en": "Items For Sale",
"ar": "بضاعه للبع"
},
"offers-discount": {

@ -1588,4 +1588,7 @@ ion-segment-button {
}
.filter-modal .modal-wrapper{
border-radius: 0px !important;
}
.offers-discount-card ion-card-content div{
font-size: 11px !important;
}
Loading…
Cancel
Save