fix action
This commit is contained in:
@@ -38,7 +38,7 @@ export class TrackingComponent implements OnInit {
|
||||
}
|
||||
|
||||
ionViewDidEnter() {
|
||||
debugger;
|
||||
//debugger;
|
||||
setTimeout(async () => {
|
||||
await this.createMap();
|
||||
}, 500);
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
<ion-icon slot="start" name="time" color="primary"></ion-icon>
|
||||
<ion-label>Timeline: {{jobData.timeline_days}} days</ion-label>
|
||||
</div>
|
||||
<!-- <div class="stud">-->
|
||||
<!-- <ion-icon slot="start" name="document-text" color="primary"></ion-icon>-->
|
||||
<!-- <ion-label>Certificate</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="document-text" color="primary"></ion-icon>
|
||||
<ion-label>By:{{jobData.job_to}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <ion-card>-->
|
||||
@@ -91,14 +91,9 @@
|
||||
<ion-segment-button value="message">
|
||||
<ion-label>Task Updates</ion-label>
|
||||
</ion-segment-button>
|
||||
|
||||
<ion-segment-button value="activities">
|
||||
<ion-label>Activities</ion-label>
|
||||
</ion-segment-button>
|
||||
<!-- <ion-segment-button value="lesson">-->
|
||||
<!-- <ion-label>Show Interest</ion-label>-->
|
||||
<!-- </ion-segment-button>-->
|
||||
|
||||
</ion-segment>
|
||||
|
||||
<div *ngIf="tabs =='activities'" class="lesson">
|
||||
@@ -107,7 +102,6 @@
|
||||
|
||||
|
||||
<div *ngIf="tabs =='message'" class="lesson">
|
||||
|
||||
<ion-card>
|
||||
<ion-card-content style="padding: 1px;">
|
||||
<ion-textarea
|
||||
@@ -138,24 +132,6 @@
|
||||
<ion-label class="description">{{interest_msg_status}}
|
||||
</ion-label>
|
||||
</ion-card>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <ion-card>-->
|
||||
<!-- <ion-card-header>-->
|
||||
<!-- <ion-card-subtitle>Send Message</ion-card-subtitle>-->
|
||||
<!-- </ion-card-header>-->
|
||||
|
||||
<!-- <ion-card-content>-->
|
||||
<!-- <ion-textarea label="Your Message to Job Owner" placeholder="Type message here" [(ngModel)]='yourmessage' ></ion-textarea>-->
|
||||
<!-- <ion-button color="secondary" expand="block" (click)="sendActiveJobMessage()">Send Updates</ion-button>-->
|
||||
<!-- </ion-card-content>-->
|
||||
|
||||
|
||||
<!-- <ion-label class="description">{{interest_msg_status}}-->
|
||||
<!-- </ion-label>-->
|
||||
<!-- </ion-card>-->
|
||||
</div>
|
||||
|
||||
<app-taskactivities [jobData]="jobData"></app-taskactivities>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/taskbanners/'+item_banner+')'">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url('+session_image_server+'/'+curr_session+'/job/'+jobData.job_uid+')'">
|
||||
<div class="ion-padding">
|
||||
<!-- <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>-->
|
||||
</div>
|
||||
@@ -26,13 +26,13 @@
|
||||
<ion-label class="bold_text">{{jobData.title}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<ion-label class="bg_text">{{jobData.contract}}</ion-label>
|
||||
<div class="rate">
|
||||
<!-- <ion-icon name="star-half-outline" color="warning"></ion-icon>-->
|
||||
<ion-label class="review"> Due date: {{jobData.delivery_date |date}} </ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row">-->
|
||||
<!-- <ion-label class="bg_text">{{jobData.contract}}</ion-label>-->
|
||||
<!-- <div class="rate">-->
|
||||
<!-- <!– <ion-icon name="star-half-outline" color="warning"></ion-icon>–>-->
|
||||
<!-- <ion-label class="review"> Due date: {{jobData.delivery_date |date}} </ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<ion-label class="color_text">Price: {{jobData.price*0.01| number : '1.2-2'}} {{jobData.currency}}</ion-label>
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
<ion-icon slot="start" name="time" color="primary"></ion-icon>
|
||||
<ion-label>Timeline: {{jobData.timeline_days}} days</ion-label>
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="document-text" color="primary"></ion-icon>
|
||||
<ion-label>By:{{jobData.job_to}}</ion-label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="stud">-->
|
||||
<!-- <ion-icon slot="start" name="document-text" color="primary"></ion-icon>-->
|
||||
<!-- <ion-label>Certificate</ion-label>-->
|
||||
@@ -90,16 +95,20 @@
|
||||
<!-- </ion-row>-->
|
||||
<!-- </ion-grid>-->
|
||||
|
||||
<ion-segment [(ngModel)]="tabs">
|
||||
<ion-segment-button value="activities">
|
||||
<ion-segment class="common_segment" [(ngModel)]="tabs">
|
||||
<ion-segment-button value="message">
|
||||
<ion-label>Task Updates</ion-label>
|
||||
</ion-segment-button>
|
||||
|
||||
<ion-segment-button value="activities">
|
||||
<ion-label>Activities</ion-label>
|
||||
</ion-segment-button>
|
||||
<!-- <ion-segment-button value="lesson">-->
|
||||
<!-- <ion-label>Show Interest</ion-label>-->
|
||||
<!-- </ion-segment-button>-->
|
||||
<ion-segment-button value="message">
|
||||
<ion-label>Send Message</ion-label>
|
||||
</ion-segment-button>
|
||||
<!-- <ion-segment-button value="message">-->
|
||||
<!-- <ion-label>Send Message</ion-label>-->
|
||||
<!-- </ion-segment-button>-->
|
||||
</ion-segment>
|
||||
|
||||
<!-- <div *ngIf="tabs =='about'" class="about">-->
|
||||
@@ -127,10 +136,9 @@
|
||||
<!-- </div>-->
|
||||
|
||||
<div *ngIf="tabs =='activities'" class="lesson">
|
||||
<app-taskactivities [jobData]="jobData"></app-taskactivities>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="tabs =='message'" class="lesson">
|
||||
|
||||
<ion-card>
|
||||
@@ -215,6 +223,8 @@
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<app-taskactivities [jobData]="jobData"></app-taskactivities>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -222,11 +232,11 @@
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<div class="button" (click)="onBack()">
|
||||
<ion-label class="text">Return</ion-label>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
<!--<ion-footer>-->
|
||||
<!-- <ion-toolbar>-->
|
||||
<!-- <div class="button" (click)="onBack()">-->
|
||||
<!-- <ion-label class="text">Return</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ion-toolbar>-->
|
||||
<!--</ion-footer>-->
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ export class JobpastduePage implements OnInit {
|
||||
jobData: any;
|
||||
tabs = 'activities';
|
||||
item_banner:string = 'default.jpg';
|
||||
|
||||
session_image_server:string='';
|
||||
curr_session:string='';
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
@@ -26,6 +27,9 @@ export class JobpastduePage implements OnInit {
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
//this.activeJobMsgList();
|
||||
}
|
||||
|
||||
onBack() {
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
<ion-icon slot="start" name="time" color="primary"></ion-icon>
|
||||
<ion-label>Timeline: {{jobData.timeline_days}} days</ion-label>
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="document-text" color="primary"></ion-icon>
|
||||
<ion-label>By:{{jobData.job_to}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style=" margin-bottom: 30px;">
|
||||
@@ -58,6 +62,7 @@
|
||||
<ion-col><ion-button color="secondary" expand="block" fill="solid" (click)="acceptCompletetion()">Accept</ion-button></ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<div style="color: red; width: 100%; text-align: center;">{{response_result}}</div>
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
@@ -78,19 +83,36 @@
|
||||
|
||||
<div *ngIf="tabs =='message'" class="lesson">
|
||||
|
||||
<ion-card>
|
||||
<ion-card-header>
|
||||
<ion-card-subtitle>Send Message to task owner</ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
<ion-card>
|
||||
<ion-card-content style="padding: 1px;">
|
||||
<ion-textarea
|
||||
style="background-color: aliceblue; margin: 0px; min-height: 120px"
|
||||
label="Your Response"
|
||||
placeholder="Enter your response message here"
|
||||
[(ngModel)]='yourmessage' ></ion-textarea>
|
||||
</ion-card-content>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col style="text-align: left;">
|
||||
<ion-button fill="outline" color="secondary" (click)="startCamera(100)">
|
||||
<ion-icon slot="icon-only" name="camera-reverse-outline"></ion-icon>
|
||||
</ion-button>
|
||||
<ion-button fill="outline" style="margin-left: 10px;" (click)="startCamera(0)">
|
||||
<ion-icon slot="icon-only" name="folder-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-button style="margin-left: 20px;"
|
||||
color="secondary"
|
||||
expand="block"
|
||||
(click)="sendActiveJobMessage()">Send Response</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
<ion-card-content>
|
||||
<ion-textarea label="Your Message to Job Owner" placeholder="Type something here" [(ngModel)]='yourmessage' ></ion-textarea>
|
||||
</ion-card-content>
|
||||
|
||||
<ion-button color="secondary" expand="block" (click)="sendJobmarketMessage()">Send Message</ion-button>
|
||||
<ion-label class="description">{{interest_msg_status}}
|
||||
</ion-label>
|
||||
</ion-card>
|
||||
<ion-label class="description">{{interest_msg_status}}
|
||||
</ion-label>
|
||||
</ion-card>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {AlertController, LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {Camera, CameraResultType, CameraSource} from "@capacitor/camera";
|
||||
|
||||
@Component({
|
||||
selector: 'app-jobreview',
|
||||
@@ -10,6 +11,7 @@ import {WrenchService} from "../../services/wrench.service";
|
||||
styleUrls: ['./jobreview.page.scss'],
|
||||
})
|
||||
export class JobreviewPage implements OnInit {
|
||||
@ViewChild('yourmessage') yourmessage;
|
||||
jobData: any;
|
||||
tabs = 'message';
|
||||
item_banner:string = 'default.jpg';
|
||||
@@ -90,6 +92,8 @@ export class JobreviewPage implements OnInit {
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
response_result:string='';
|
||||
|
||||
reqData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
@@ -130,8 +134,13 @@ export class JobreviewPage implements OnInit {
|
||||
doJobActionResponse => {
|
||||
this.doJobActionResponse = doJobActionResponse;
|
||||
console.log("doJobAction RETURN->", this.doJobActionResponse);
|
||||
// debugger;
|
||||
|
||||
if ( this.doJobActionResponse !=undefined && this.doJobActionResponse.result !=''){
|
||||
this.response_result = this.doJobActionResponse.result;
|
||||
setTimeout(async () => {
|
||||
this.response_result='';
|
||||
await this.onBack();
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -139,4 +148,109 @@ export class JobreviewPage implements OnInit {
|
||||
// return this.getPostData("activejobstatus", reqData);
|
||||
// }
|
||||
|
||||
|
||||
reqMessageData: {
|
||||
action:number, member_id: number, uid: string, sessionid: string, msg_type:string,
|
||||
contract:string,
|
||||
message:string
|
||||
};
|
||||
|
||||
interest_status:string = "";
|
||||
interest_msg_status:string = "";
|
||||
|
||||
msgReqResult:any;
|
||||
async sendActiveJobMessage(){
|
||||
if (this.yourmessage == undefined || this.yourmessage?.length < 5){
|
||||
alert("Enter Message to send");
|
||||
return;
|
||||
}
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 2500,
|
||||
});
|
||||
this.reqMessageData = {action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
msg_type: "TEXT",
|
||||
contract:this.jobData.contract,
|
||||
message: this.yourmessage
|
||||
}
|
||||
|
||||
loading.present();
|
||||
this.wrenchService.sendTaskMessage(this.reqMessageData).subscribe(
|
||||
reqResult => {
|
||||
this.msgReqResult = reqResult;
|
||||
console.log("msgReqResult RETURN->", this.msgReqResult);
|
||||
this.interest_msg_status = this.msgReqResult?.status;
|
||||
//this.activeJobMsgList();
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
uploadData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type:'FILE',
|
||||
file_name: string,
|
||||
file_size: number,
|
||||
file_type: string,
|
||||
file_data: string
|
||||
};
|
||||
|
||||
uploadResult:any;
|
||||
async startCamera(cameraMode){
|
||||
const image = await Camera.getPhoto({
|
||||
quality: 50,
|
||||
width : 600,
|
||||
height : 300,
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.Base64,
|
||||
source: (cameraMode == 100 ) ? CameraSource.Camera : CameraSource.Photos // Camera, Photos or Prompt!
|
||||
});
|
||||
|
||||
if (image) {
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Uploading updates',
|
||||
duration: 5000,
|
||||
});
|
||||
var file_size = parseInt(String(image.base64String.toString().length / 1.3224954) ) ;
|
||||
// this.saveImage(image)
|
||||
//debugger;
|
||||
//image.base64String
|
||||
this.uploadData={
|
||||
action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
msg_type:'FILE',
|
||||
file_name: `${this.jobData.contract}-job.${image.format}`,
|
||||
file_size: file_size ,
|
||||
file_type: `image/${image.format}`,
|
||||
file_data: image.base64String
|
||||
};
|
||||
// console.log(this.uploadData);
|
||||
loading.present();
|
||||
this.wrenchService.uploadFile(this.uploadData).subscribe(
|
||||
uploadResult => {
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
|
||||
// console.log( this.uploadData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="active_job_count == 0 && active_offers_count > 0; ">
|
||||
<ion-card style="margin:0px; background-color: #141d71; color: white; border-radius: 15px;">
|
||||
<ion-card style="margin:0px; background-color: #0b5e86; color: white; border-radius: 15px;">
|
||||
<img alt="WrenchBoard Tasks" src="https://www.wrenchboard.com/assets/images/apps/current-tasks.png" />
|
||||
<ion-card-header>
|
||||
<ion-card-title style="color: white; font-weight: bolder'">Ready to Start</ion-card-title>
|
||||
<ion-card-title style="color: white; font-weight: bolder;">Ready to Start ?</ion-card-title>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
|
||||
Reference in New Issue
Block a user