Reject accpet offrs

This commit is contained in:
CHIEFSOFT\ameye
2023-08-18 23:00:21 -04:00
parent eb7177db96
commit cfb0448b52
8 changed files with 80 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<ion-content>
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/market.jpg)'">
<div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/jobs/default.jpg)'">
<div class="ion-padding">
<ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>
</div>
@@ -3,6 +3,8 @@ ion-content {
.back_image {
width: 100%;
height: 130px;
background-size: contain;
background-repeat: no-repeat;
.back {
font-size: 25px;
@@ -52,7 +52,7 @@
<div class="video" *ngFor="let item of jobManagerOffersJobsData">
<div class="left">
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
<div class="bg_image men_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/offerslist/default.jpg)'"></div>
<div class="text">
<ion-label class="bold_text">{{item.title}}</ion-label>
@@ -57,7 +57,7 @@
<div class="video" *ngFor="let item of jobManagerActiveData" (click)="jobActive(item)">
<div class="left">
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
<div class="bg_image men_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/jobs/default.jpg)'"></div>
<div class="text">
<ion-label class="bold_text">{{item.title}}</ion-label>
@@ -79,8 +79,7 @@
<div class="video" *ngFor="let item of jobManagerReviewData" (click)="jobReview(item)">
<div class="left">
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
<div class="bg_image men_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/jobs/default.jpg)'"></div>
<div class="text">
<ion-label class="bold_text">{{item.title}}</ion-label>
<ion-label class="grey_text">{{item.description}}</ion-label>
@@ -100,8 +99,7 @@
<div class="video" *ngFor="let item of jobManagerPastDueData" (click)="jobPastDue(item)">
<div class="left">
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
<div class="bg_image men_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/jobs/default.jpg)'"></div>
<div class="text">
<ion-label class="bold_text">{{item.title}}</ion-label>
<ion-label class="grey_text">{{item.description}}</ion-label>
+6 -4
View File
@@ -8,12 +8,14 @@
<div class="ion-padding">
<div class="flex">
<ion-label class="bold_text">You have 00 offer(s)</ion-label>
<ion-label class="bold_text">You have {{total_offers}} offer(s)</ion-label>
<!-- <ion-icon slot="end" name="bookmark-outline" color="primary"></ion-icon>-->
</div>
<ion-card *ngFor="let item of myOffersData">
<img alt="Silhouette of mountains" src="https://ionicframework.com/docs/img/demos/card-media.png" />
<div class="top_banner">
<img class="offer_banner" alt="{{item.title}}" src="https://www.wrenchboard.com/assets/images/apps/offerslist/{{item.banner}}" />
</div>
<ion-card-header>
<ion-card-title>{{item.title}}</ion-card-title>
<ion-card-subtitle>Expiration:{{item.expire}}</ion-card-subtitle>
@@ -22,8 +24,8 @@
<ion-card-content>
{{item.job_description}}
</ion-card-content>
<ion-button fill="clear">Reject</ion-button>
<ion-button fill="clear">Start Now</ion-button>
<ion-button fill="clear" (click)="requestReject(item)">Reject</ion-button>
<ion-button fill="clear" (click)="requestStart(item)">Start Now</ion-button>
</ion-card>
@@ -364,6 +364,21 @@ ion-card{
ion-card-subtitle{
color: red;
}
.top_banner{
width: 100%;
//background-color: #2dd36f;
margin-left: auto;
margin-right: auto;
text-align: center;
.offer_banner{
width: auto;
height: 130px;
background-size: contain;
background-repeat: no-repeat;
}
}
}
ion-footer {
+51 -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 { WrenchService } from 'src/app/services/wrench.service';
import {SessionDataProviderService} from "../../store/session-data-provider.service";
@@ -17,6 +17,7 @@ export class JoboffersPage implements OnInit {
private navctr: NavController,
private router: Router,
public sessionDataProviderService: SessionDataProviderService,
private alertController:AlertController,
private wrenchService: WrenchService
) { }
@@ -43,6 +44,7 @@ export class JoboffersPage implements OnInit {
limit:20,
page:1, offset:number
};
total_offers:number = 0;
myOffersTotalData:any;
myOffersData: [];
getMyOffersData(){
@@ -58,9 +60,57 @@ export class JoboffersPage implements OnInit {
console.log("myOffersTotalData RETURN->", this.myOffersTotalData);
this.myOffersData = this.myOffersTotalData.result_list;
console.log("myOffersData RETURN DATA->", this.myOffersData);
this.total_offers = this.myOffersData.length;
}
);
}
async requestStart(item) {
const alert = await this.alertController.create({
header: "Ready to start",
message: "You will start the task now, offer shall be completed in allocated timeline.",
buttons: [
{
text: "Cancel",
role: "cancel",
handler: () => {
this.getMyOffersData();
},
},
{
text: "Start Now",
handler: () => {
this.getMyOffersData();
},
},
],
});
await alert.present();
}
async requestReject(item) {
const alert = await this.alertController.create({
header: "Confirm Reject",
message: "This task will go away, you dont have to do anything.",
buttons: [
{
text: "Cancel",
role: "cancel",
handler: () => {
this.getMyOffersData();
},
},
{
text: "Reject",
handler: () => {
this.getMyOffersData();
},
},
],
});
await alert.present();
}
}
@@ -2,7 +2,7 @@
ion-content {
.back_image {
width: 100%;
height: 230px;
height: 130px;
.back {
font-size: 25px;