job owner page
This commit is contained in:
@@ -71,8 +71,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="tabs =='activities'" class="lesson">
|
<div *ngIf="tabs =='activities'" class="lesson">
|
||||||
|
|
||||||
|
|
||||||
<ion-card>
|
<ion-card>
|
||||||
<ion-card-content style="padding: 1px;">
|
<ion-card-content style="padding: 1px;">
|
||||||
<ion-textarea
|
<ion-textarea
|
||||||
@@ -103,7 +101,6 @@
|
|||||||
<ion-label class="description">{{interest_msg_status}}
|
<ion-label class="description">{{interest_msg_status}}
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="tabs =='review'" class="review_tab">
|
<div *ngIf="tabs =='review'" class="review_tab">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content>
|
<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">
|
<div class="ion-padding">
|
||||||
<!-- <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>-->
|
<!-- <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>-->
|
||||||
</div>
|
</div>
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
<!-- <ion-label class="bold_text">{{jobData.title}}</ion-label>-->
|
<!-- <ion-label class="bold_text">{{jobData.title}}</ion-label>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<!-- <div class="row">-->
|
||||||
<ion-label class="bg_text">{{jobData.contract}}</ion-label>
|
<!-- <ion-label class="bg_text">{{jobData.contract}}</ion-label>-->
|
||||||
<div class="rate">
|
<!-- <div class="rate">-->
|
||||||
<!-- <ion-icon name="star-half-outline" color="warning"></ion-icon>-->
|
<!-- <!– <ion-icon name="star-half-outline" color="warning"></ion-icon>–>-->
|
||||||
<ion-label class="review"> Due date: {{jobData.delivery_date |date}} </ion-label>
|
<!-- <ion-label class="review"> Due date: {{jobData.delivery_date |date}} </ion-label>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<ion-label class="color_text">Price: {{jobData.price*0.01| number : '1.2-2'}} {{jobData.currency}}</ion-label>
|
<ion-label class="color_text">Price: {{jobData.price*0.01| number : '1.2-2'}} {{jobData.currency}}</ion-label>
|
||||||
|
|
||||||
@@ -87,133 +87,79 @@
|
|||||||
<!-- </ion-row>-->
|
<!-- </ion-row>-->
|
||||||
<!-- </ion-grid>-->
|
<!-- </ion-grid>-->
|
||||||
|
|
||||||
<ion-segment [(ngModel)]="tabs">
|
<ion-segment class="common_segment" [(ngModel)]="tabs">
|
||||||
<ion-segment-button value="activities">
|
<ion-segment-button value="message">
|
||||||
<ion-label>Activities</ion-label>
|
<ion-label>Task Updates</ion-label>
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
|
||||||
|
<ion-segment-button value="activities">
|
||||||
|
<ion-label>Activities</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
<!-- <ion-segment-button value="lesson">-->
|
<!-- <ion-segment-button value="lesson">-->
|
||||||
<!-- <ion-label>Show Interest</ion-label>-->
|
<!-- <ion-label>Show Interest</ion-label>-->
|
||||||
<!-- </ion-segment-button>-->
|
<!-- </ion-segment-button>-->
|
||||||
<ion-segment-button value="message">
|
|
||||||
<ion-label>Send Message</ion-label>
|
|
||||||
</ion-segment-button>
|
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
|
|
||||||
<!-- <div *ngIf="tabs =='about'" class="about">-->
|
|
||||||
<!-- <ion-label class="head_text">{{jobData.offer_code}}</ion-label>-->
|
|
||||||
|
|
||||||
<!-- <!– <div class="mentor" (click)="onMentor()">–>-->
|
|
||||||
<!-- <div class="mentor">-->
|
|
||||||
<!-- <div class="left">-->
|
|
||||||
<!-- <div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/taskbanners/default.jpg)'"></div>-->
|
|
||||||
<!-- <div style="margin-left: 10px;">-->
|
|
||||||
<!-- <ion-label class="bold">Expires</ion-label>-->
|
|
||||||
<!-- <ion-label class="grey">{{jobData.expire}}</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <!– <ion-icon name="chatbubble-ellipses-outline" color="primary"></ion-icon>–>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
<!-- <ion-label class="head_text">Description</ion-label>-->
|
|
||||||
<!-- <ion-label class="description">{{jobData.job_description}}-->
|
|
||||||
<!-- </ion-label>-->
|
|
||||||
|
|
||||||
<!-- <ion-label class="head_text">Delivery Details</ion-label>-->
|
|
||||||
<!-- <ion-label class="description">{{jobData.description}}-->
|
|
||||||
<!-- </ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
<div *ngIf="tabs =='activities'" class="lesson">
|
<div *ngIf="tabs =='activities'" class="lesson">
|
||||||
<app-taskactivities [jobData]="jobData"></app-taskactivities>
|
<!-- <app-taskactivities [jobData]="jobData"></app-taskactivities>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="tabs =='message'" class="lesson">
|
<div *ngIf="tabs =='message'" class="lesson">
|
||||||
|
|
||||||
|
<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>
|
<ion-label class="description">{{interest_msg_status}}
|
||||||
<ion-card-header>
|
</ion-label>
|
||||||
<ion-card-subtitle>Send Message</ion-card-subtitle>
|
</ion-card>
|
||||||
</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 class="video">-->
|
|
||||||
|
|
||||||
<!-- <div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/taskbanners/default.jpg)'"></div>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <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>
|
||||||
|
|
||||||
<!-- <div class="story-item">-->
|
<app-taskactivities [jobData]="jobData"></app-taskactivities>
|
||||||
<!-- <div class="menu">-->
|
|
||||||
<!-- <div class="text">-->
|
|
||||||
<!-- <div class="select show">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="light" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num white">All</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="select">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="primary" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num">1</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="select">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="primary" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num">2</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="select">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="primary" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num">3</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="select">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="primary" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num">4</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="select">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="primary" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num">5</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
<!-- <div class="reviw_list" *ngFor="let item of [1,2,3,4,5]">-->
|
|
||||||
<!-- <div class="profile">-->
|
|
||||||
<!-- <div class="left">-->
|
|
||||||
<!-- <div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/p2.jpg)'"></div>-->
|
|
||||||
<!-- <div style="margin-left: 10px;">-->
|
|
||||||
<!-- <ion-label class="bold">Jonathon Williams</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="right">-->
|
|
||||||
<!-- <div class="select">-->
|
|
||||||
<!-- <ion-icon slot="start" name="star" color="primary" class="star_icon"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="rate_num">5</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <ion-icon name="ellipsis-horizontal-circle-outline"></ion-icon>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <ion-label>The course is very good. the experience of the menter is very clear and easy to understand-->
|
|
||||||
<!-- </ion-label>-->
|
|
||||||
|
|
||||||
<!-- <div class="like">-->
|
|
||||||
<!-- <ion-icon slot="start" name="heart" color="danger" class="heart"></ion-icon>-->
|
|
||||||
<!-- <ion-label class="count">330</ion-label>-->
|
|
||||||
<!-- <ion-label class="time">2 Days ago</ion-label>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||||
import {NavController} from "@ionic/angular";
|
import {LoadingController, NavController} from "@ionic/angular";
|
||||||
import {Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||||
import {WrenchService} from "../../services/wrench.service";
|
import {WrenchService} from "../../services/wrench.service";
|
||||||
|
import {Camera, CameraResultType, CameraSource} from "@capacitor/camera";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-jobactive',
|
selector: 'app-jobactive',
|
||||||
@@ -13,7 +14,7 @@ export class JobactivePage implements OnInit {
|
|||||||
@ViewChild('yourmessage') yourmessage;
|
@ViewChild('yourmessage') yourmessage;
|
||||||
|
|
||||||
jobData: any;
|
jobData: any;
|
||||||
tabs = 'activities';
|
tabs = 'message';
|
||||||
item_banner:string = 'default.jpg';
|
item_banner:string = 'default.jpg';
|
||||||
session_image_server:string='';
|
session_image_server:string='';
|
||||||
curr_session:string='';
|
curr_session:string='';
|
||||||
@@ -22,7 +23,8 @@ export class JobactivePage implements OnInit {
|
|||||||
private navctr: NavController,
|
private navctr: NavController,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public sessionDataProviderService: SessionDataProviderService,
|
public sessionDataProviderService: SessionDataProviderService,
|
||||||
private wrenchService: WrenchService
|
private wrenchService: WrenchService,
|
||||||
|
private loadingCtrl: LoadingController
|
||||||
) {
|
) {
|
||||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||||
this.item_banner = this.jobData.banner;
|
this.item_banner = this.jobData.banner;
|
||||||
@@ -31,6 +33,7 @@ export class JobactivePage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.curr_session = this.sessionDataProviderService.session;
|
this.curr_session = this.sessionDataProviderService.session;
|
||||||
|
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||||
//this.activeJobMsgList();
|
//this.activeJobMsgList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,12 +83,16 @@ export class JobactivePage implements OnInit {
|
|||||||
interest_msg_status:string = "";
|
interest_msg_status:string = "";
|
||||||
|
|
||||||
msgReqResult:any;
|
msgReqResult:any;
|
||||||
sendActiveJobMessage(){
|
async sendActiveJobMessage(){
|
||||||
if (this.yourmessage.length < 5){
|
if (this.yourmessage == undefined || this.yourmessage?.length < 5){
|
||||||
alert("Enter Message to send");
|
alert("Enter Message to send");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const loading = await this.loadingCtrl.create({
|
||||||
|
message: 'Sending...',
|
||||||
|
duration: 2500,
|
||||||
|
});
|
||||||
this.reqData = {action:14010,
|
this.reqData = {action:14010,
|
||||||
member_id: this.sessionDataProviderService.member_id,
|
member_id: this.sessionDataProviderService.member_id,
|
||||||
uid: this.sessionDataProviderService.member_uid,
|
uid: this.sessionDataProviderService.member_uid,
|
||||||
@@ -95,14 +102,78 @@ export class JobactivePage implements OnInit {
|
|||||||
message: this.yourmessage
|
message: this.yourmessage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loading.present();
|
||||||
this.wrenchService.sendTaskMessage(this.reqData).subscribe(
|
this.wrenchService.sendTaskMessage(this.reqData).subscribe(
|
||||||
reqResult => {
|
reqResult => {
|
||||||
this.msgReqResult = reqResult;
|
this.msgReqResult = reqResult;
|
||||||
console.log("msgReqResult RETURN->", this.msgReqResult);
|
console.log("msgReqResult RETURN->", this.msgReqResult);
|
||||||
this.interest_msg_status = this.msgReqResult?.status;
|
this.interest_msg_status = this.msgReqResult?.status;
|
||||||
// this.activeJobMsgList();
|
//this.activeJobMsgList();
|
||||||
|
const event = new Event("app-taskactivities-refresh");
|
||||||
|
// Dispatch the event.
|
||||||
|
dispatchEvent(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uploadData: {
|
||||||
|
action:number,
|
||||||
|
member_id: number,
|
||||||
|
uid: string,
|
||||||
|
family_uid: 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:11305,
|
||||||
|
member_id: this.sessionDataProviderService.member_id,
|
||||||
|
uid: this.sessionDataProviderService.member_uid,
|
||||||
|
family_uid: 'FAKE',
|
||||||
|
sessionid: this.sessionDataProviderService.session ,
|
||||||
|
msg_type:'FILE',
|
||||||
|
file_name: `family-banner.${image.format}`,
|
||||||
|
file_size: file_size ,
|
||||||
|
file_type: `image/${image.format}`,
|
||||||
|
file_data: image.base64String
|
||||||
|
};
|
||||||
|
//console.log(image);
|
||||||
|
loading.present();
|
||||||
|
// this.wrenchService.uploadFile(this.uploadData).subscribe(
|
||||||
|
// uploadResult => {
|
||||||
|
// this.uploadResult = uploadResult;
|
||||||
|
// console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
console.log( this.uploadData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user