Coupon pages

This commit is contained in:
CHIEFSOFT\ameye
2023-08-28 09:49:49 -04:00
parent 5c21730d17
commit c28f21aabe
6 changed files with 59 additions and 7 deletions
@@ -20,7 +20,7 @@
</div>
</div>
<ion-label class="color_text">Price: {{jobData.price*0.01}} {{jobData.currency}}</ion-label>
<ion-label class="color_text">Price: {{jobData.price*0.01| number : '1.2-2'}} {{jobData.currency}}</ion-label>
<div class="items">
<div class="stud">
@@ -21,7 +21,7 @@
</div>
</div>
<ion-label class="color_text">Price: {{jobData.price*0.01}} {{jobData.currency}}</ion-label>
<ion-label class="color_text">Price: {{jobData.price*0.01| number : '1.2-2'}} {{jobData.currency}}</ion-label>
<div class="items">
<div class="stud">
+1 -1
View File
@@ -28,7 +28,7 @@
<div class="flex">
<div class="text">
<ion-label class="bold_text">{{item.title}}</ion-label>
<ion-label class="price_line"> {{item.price*0.01}} {{item.currency}} </ion-label>
<ion-label class="price_line"> {{item.price*0.01| number : '1.2-2'}} {{item.currency}} </ion-label>
<ion-label class="due_date">Timeline: {{item.timeline_days}} days</ion-label>
</div>
</div>
+3 -3
View File
@@ -56,12 +56,12 @@
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
<div class="text">
<ion-label class="bold_text">{{item.amount*0.01}} {{item.currency}} </ion-label>
<ion-label class="bold_text">{{item.amount*0.01| number : '1.2-2'}} {{item.currency}} </ion-label>
<ion-label class="grey_text">{{item.code}} - {{item.added}}</ion-label>
</div>
</div>
<div class="right">
<ion-button color="secondary">Redeem</ion-button>
<ion-button color="secondary" (click)="startRedeem(item)">Redeem</ion-button>
</div>
</div>
@@ -84,7 +84,7 @@
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
<div class="text">
<ion-label class="bold_text">{{item.amount*0.01}} {{item.currency}} </ion-label>
<ion-label class="bold_text">{{item.amount*0.01| number : '1.2-2'}} {{item.currency}} </ion-label>
<ion-label class="grey_text">{{item.code}} - {{item.added}}</ion-label>
</div>
</div>
+50 -1
View File
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import {NavController} from "@ionic/angular";
import {AlertController, NavController} from "@ionic/angular";
import {Router} from "@angular/router";
import {SessionDataProviderService} from "../../store/session-data-provider.service";
import {WrenchService} from "../../services/wrench.service";
@@ -16,6 +16,7 @@ export class MycouponsPage implements OnInit {
constructor(
private navctr: NavController,
private router: Router,
private alertController:AlertController,
public sessionDataProviderService: SessionDataProviderService,
private wrenchService: WrenchService,
) { }
@@ -81,4 +82,52 @@ export class MycouponsPage implements OnInit {
);
}
redeemData: {
action:number,
member_id: number,
uid: string,
sessionid: string,
code:string,
code_id: number
};
async startRedeem(item){
const redMsg = "Confirm you are ready to redeem " + item.amount*0.01 + " " + item.currency;
const alert = await this.alertController.create({
header: "Redeem Coupon",
message: redMsg,
buttons: [
{
text: "Cancel",
role: "cancel",
handler: () => {
// this.getMyOffersData();
},
},
{
text: "Redeem",
handler: () => {
this.redeemData = {
action:85020,
member_id: this.sessionDataProviderService.member_id,
uid: this.sessionDataProviderService.member_uid,
sessionid: this.sessionDataProviderService.session ,
code:item.code,
code_id: item.code_id
};
debugger;
/*
redeemCoupon(redeemData){
return this.getPostData("couponredeem", redeemData);
}
*/
this.getMyCouponHxData();
this.getMyCouponPendData();
},
},
],
});
await alert.present();
}
}
+3
View File
@@ -184,6 +184,9 @@ export class WrenchService {
getCouponPending(usrData){
return this.getPostData("couponpending", usrData);
}
redeemCoupon(redeemData){
return this.getPostData("couponredeem", redeemData);
}
sendMoneyAction(sendmoneyData){
return this.getPostData("sendmoney", sendmoneyData);
}