add pic
This commit is contained in:
@@ -24,11 +24,14 @@ export class MyjobOffersComponent implements OnInit {
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
|
||||
addEventListener('app-myjob-offers-refresh', () => {
|
||||
this.getPendingOffersData();
|
||||
});
|
||||
this.getPendingOffersData();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log('AMEYE===>', this.jobData);
|
||||
// console.log('AMEYE===>', this.jobData);
|
||||
}
|
||||
usrData: {
|
||||
action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
<div class="lesson">
|
||||
<div class="task_activity">
|
||||
<!-- <div class="flex">-->
|
||||
<!-- <ion-label class="bold">Most Popular Courses</ion-label>-->
|
||||
<!-- <ion-label class="color">See all</ion-label>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="sec">
|
||||
<ion-label class="grey">Due Date:{{jobData.delivery_date | date }}</ion-label>
|
||||
<ion-label class="red">Due Date:{{jobData.delivery_date | date }}</ion-label>
|
||||
<ion-label class="color">{{jobData.contract}}</ion-label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="video {{item.who}}" *ngFor="let item of msgListData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/msg/TEXT.svg)'"></div>
|
||||
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">{{item.msg_firstname}}-{{item.msg_date}}</ion-label>
|
||||
<ion-label class="bold_text">{{item.msg_firstname}}-{{item.msg_date |date}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.message}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="right">-->
|
||||
<!--<!– <ion-icon name="lock-closed-outline"></ion-icon>–>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -48,27 +48,15 @@
|
||||
<ion-segment-button value="activities">
|
||||
<ion-label>Send Updates</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="about">
|
||||
<ion-label>Details</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="review">
|
||||
<ion-label>Actions</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="about">
|
||||
<ion-label>Details</ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
<div *ngIf="tabs =='about'" class="about">
|
||||
<!-- <ion-label class="head_text">Mentor</ion-label>-->
|
||||
|
||||
<!-- <div class="mentor">-->
|
||||
<!-- <div class="left">-->
|
||||
<!-- <div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/taskbanners/'+jobData.banner+')'"></div>-->
|
||||
<!-- <div style="margin-left: 10px;">-->
|
||||
<!-- <ion-label class="bold">Due Date</ion-label>-->
|
||||
<!-- <ion-label class="grey">{{jobData.delivery_date}}</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– <ion-icon name="chatbubble-ellipses-outline" color="primary"></ion-icon>–>-->
|
||||
<!-- </div>-->
|
||||
<div class="work_area">
|
||||
<ion-label class="head_text">Description</ion-label>
|
||||
<ion-label class="description">{{jobData.job_description}}
|
||||
@@ -96,15 +84,18 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col style="text-align: left;">
|
||||
<ion-button color="secondary">
|
||||
<ion-button fill="outline" color="secondary" (click)="startCamera(100)">
|
||||
<ion-icon slot="icon-only" name="camera-reverse-outline"></ion-icon>
|
||||
</ion-button>
|
||||
<ion-button style="margin-left: 10px;">
|
||||
<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 color="secondary" expand="block" (click)="sendActiveJobMessage()">Send Updates</ion-button>
|
||||
<ion-button style="margin-left: 20px;"
|
||||
color="secondary"
|
||||
expand="block"
|
||||
(click)="sendActiveJobMessage()">Send Updates</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {AlertController, NavController} from "@ionic/angular";
|
||||
import {AlertController, LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import { SessionDataProviderService } from 'src/app/store/session-data-provider.service';
|
||||
import { BlogDataService } from 'src/app/store/blog-data.service';
|
||||
import { WrenchService } from 'src/app/services/wrench.service';
|
||||
import {Camera, CameraResultType, CameraSource} from "@capacitor/camera";
|
||||
|
||||
@Component({
|
||||
selector: 'app-activetask',
|
||||
@@ -24,7 +25,8 @@ export class ActivetaskPage implements OnInit {
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private alertController:AlertController,
|
||||
private wrenchService: WrenchService,
|
||||
public blogDataService: BlogDataService
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController
|
||||
) {
|
||||
this.yourmessage='';
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
@@ -32,6 +34,9 @@ export class ActivetaskPage implements OnInit {
|
||||
console.log("XXXXX 2", this.router.getCurrentNavigation().extras.state);
|
||||
//console.log("XXXXX 3", this.router.getCurrentNavigation().extras.state.ID);
|
||||
this.status_description = this.jobData?.status_description;
|
||||
if ( this.jobData == undefined || this.jobData.status_description==''){
|
||||
this.onBack();
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -115,12 +120,16 @@ export class ActivetaskPage implements OnInit {
|
||||
interest_msg_status:string = "";
|
||||
|
||||
msgReqResult:any;
|
||||
sendActiveJobMessage(){
|
||||
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.reqData = {action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
@@ -130,6 +139,7 @@ export class ActivetaskPage implements OnInit {
|
||||
message: this.yourmessage
|
||||
}
|
||||
|
||||
loading.present();
|
||||
this.wrenchService.sendTaskMessage(this.reqData).subscribe(
|
||||
reqResult => {
|
||||
this.msgReqResult = reqResult;
|
||||
@@ -227,5 +237,62 @@ export class ActivetaskPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -118,15 +118,16 @@ ion-modal.custom_modal_bottom {
|
||||
color:green;
|
||||
}
|
||||
.SENDER{
|
||||
background-color: yellow;
|
||||
background-color: #eaf3f6;
|
||||
margin-left: 50px;
|
||||
}
|
||||
.RECIPIENT{
|
||||
background-color: #e3f8f8;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.work_area{
|
||||
background-color: lightblue;
|
||||
background-color: #e9f3f6;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user