fix styles
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {AlertController, LoadingController, NavController, ToastController} 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 {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";
|
||||
import {TasksDataService} from "../../store/tasks-data.service";
|
||||
import {FilePicker} from "@capawesome/capacitor-file-picker";
|
||||
@@ -11,442 +11,462 @@ import {MediaConnectService} from "../../services/media-connect.service";
|
||||
import {SocketToolsService} from "../../services/socket-tools.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-activetask',
|
||||
templateUrl: './activetask.page.html',
|
||||
styleUrls: ['./activetask.page.scss'],
|
||||
selector: 'app-activetask',
|
||||
templateUrl: './activetask.page.html',
|
||||
styleUrls: ['./activetask.page.scss'],
|
||||
})
|
||||
export class ActivetaskPage implements OnInit {
|
||||
@ViewChild('yourmessage') yourmessage;
|
||||
tabs = 'activities';
|
||||
status_description:string='';
|
||||
session_image_server:string='';
|
||||
curr_session:string='';
|
||||
socket_room:string='';
|
||||
@ViewChild('yourmessage') yourmessage;
|
||||
tabs = 'activities';
|
||||
status_description: string = '';
|
||||
session_image_server: string = '';
|
||||
curr_session: string = '';
|
||||
socket_room: string = '';
|
||||
|
||||
jobData: any;
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private alertController:AlertController,
|
||||
private wrenchService: WrenchService,
|
||||
public tasksDataService:TasksDataService,
|
||||
private toastController: ToastController,
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
private mediaConnectService: MediaConnectService,
|
||||
private socketToolsService: SocketToolsService
|
||||
) {
|
||||
this.yourmessage='';
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
// debugger;
|
||||
console.log("XXXXX 1", this.router.getCurrentNavigation().extras);
|
||||
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();
|
||||
}
|
||||
this.socket_room = `${this.jobData.contract}-${this.jobData.contract_uid}`;
|
||||
this.socketToolsService.joinSocketRoom(this.socket_room );
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
//this.activeJobMsgList();
|
||||
}
|
||||
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
/*
|
||||
sendTaskMessage(messageData){
|
||||
return this.getPostData("sendtaskmessage", messageData);
|
||||
}
|
||||
|
||||
activeJobMsgList(contractData){
|
||||
return this.getPostData("activejobmsglist", contractData);
|
||||
}
|
||||
|
||||
'member_id' => int 1
|
||||
'sessionid' => string '936571FD2E081B667930E7FFDF4D819938171883CA0CC951DC6C4FB184280EB3' (length=64)
|
||||
'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
'message' => string 'Lorem Ipsum comes from a latin text written in 45BC by Roman statesman, lawyer, scholar, and philosopher, Marcus Tullius Cicero' (length=127)
|
||||
'msg_type' => string 'TEXT' (length=4)
|
||||
'contract' => string '49BWBRW738' (length=10)
|
||||
'action' => int 14010
|
||||
*/
|
||||
|
||||
|
||||
// contrData: {
|
||||
// action:number,
|
||||
// member_id: number,
|
||||
// uid: string,
|
||||
// sessionid: string,
|
||||
// limit:20,
|
||||
// contract:string,
|
||||
// offset: 0
|
||||
// };
|
||||
// msgListTotalData:any;
|
||||
// msgListData: [];
|
||||
// activeJobMsgList(){
|
||||
// this.contrData = {
|
||||
// action:14011,
|
||||
// member_id: this.sessionDataProviderService.member_id,
|
||||
// uid: this.sessionDataProviderService.member_uid,
|
||||
// sessionid: this.sessionDataProviderService.session ,
|
||||
// limit:20,
|
||||
// contract: this.jobData.contract,
|
||||
// offset: 0}
|
||||
//
|
||||
// this.wrenchService.activeJobMsgList(this.contrData).subscribe(
|
||||
// msgListTotalData => {
|
||||
// this.msgListTotalData = msgListTotalData;
|
||||
// // console.log("REFER RETURN->", this.referTotalData);
|
||||
// this.msgListData = this.msgListTotalData.result_list;
|
||||
// console.log("REFER RETURN DATA->", this.msgListData);
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// }
|
||||
|
||||
/*
|
||||
'member_id' => int 1
|
||||
'sessionid' => string '936571FD2E081B667930E7FFDF4D819938171883CA0CC951DC6C4FB184280EB3' (length=64)
|
||||
'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
'message' => string 'Lorem Ipsum comes from a latin text written in 45BC by Roman statesman, lawyer, scholar, and philosopher, Marcus Tullius Cicero' (length=127)
|
||||
'msg_type' => string 'TEXT' (length=4)
|
||||
'contract' => string '49BWBRW738' (length=10)
|
||||
'action' => int 14010
|
||||
*/
|
||||
|
||||
reqData: {
|
||||
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.reqData = {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.reqData).subscribe(
|
||||
reqResult => {
|
||||
loading.dismiss();
|
||||
this.msgReqResult = reqResult;
|
||||
// console.log("msgReqResult RETURN->", this.msgReqResult);
|
||||
|
||||
this.interest_msg_status = this.msgReqResult?.status;
|
||||
setTimeout(()=>{
|
||||
this.interest_msg_status ='';
|
||||
},5000);
|
||||
this.yourmessage ='';
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
this.yourmessage = '';
|
||||
this.socketToolsService.emmitSocketEvent("send_message",this.yourmessage, this.socket_room);
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
jobData: any;
|
||||
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private alertController: AlertController,
|
||||
private wrenchService: WrenchService,
|
||||
public tasksDataService: TasksDataService,
|
||||
private toastController: ToastController,
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
private mediaConnectService: MediaConnectService,
|
||||
private socketToolsService: SocketToolsService
|
||||
) {
|
||||
this.yourmessage = '';
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
// debugger;
|
||||
console.log("XXXXX 1", this.router.getCurrentNavigation().extras);
|
||||
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();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
completionRestricted(){
|
||||
const strict_timeline = this.jobData.strict_timeline;
|
||||
const minimum_due = new Date(this.jobData.minimum_due);
|
||||
|
||||
if ( strict_timeline > 0 ){
|
||||
const today = new Date();
|
||||
const result = ( today > minimum_due);
|
||||
if ( result == false) {
|
||||
const tMeassage = "This task can onlt be marked completed after " + minimum_due;
|
||||
this.presentToast(tMeassage, "middle", 5500);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
async taskCompleted(){
|
||||
// alert(100);
|
||||
if ( this.completionRestricted()==false ){
|
||||
return;
|
||||
}
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_COMPLETE',
|
||||
this.socket_room = `${this.jobData.contract}-${this.jobData.contract_uid}`;
|
||||
this.socketToolsService.joinSocketRoom(this.socket_room);
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Confirm the task is completed.",
|
||||
message: "The task owner will confirm the completion acceptance or rejection soon.",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Confirm Completed ?",
|
||||
handler: () => {
|
||||
ngOnInit() {
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
//this.activeJobMsgList();
|
||||
}
|
||||
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
/*
|
||||
sendTaskMessage(messageData){
|
||||
return this.getPostData("sendtaskmessage", messageData);
|
||||
}
|
||||
|
||||
activeJobMsgList(contractData){
|
||||
return this.getPostData("activejobmsglist", contractData);
|
||||
}
|
||||
|
||||
'member_id' => int 1
|
||||
'sessionid' => string '936571FD2E081B667930E7FFDF4D819938171883CA0CC951DC6C4FB184280EB3' (length=64)
|
||||
'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
'message' => string 'Lorem Ipsum comes from a latin text written in 45BC by Roman statesman, lawyer, scholar, and philosopher, Marcus Tullius Cicero' (length=127)
|
||||
'msg_type' => string 'TEXT' (length=4)
|
||||
'contract' => string '49BWBRW738' (length=10)
|
||||
'action' => int 14010
|
||||
*/
|
||||
|
||||
|
||||
// contrData: {
|
||||
// action:number,
|
||||
// member_id: number,
|
||||
// uid: string,
|
||||
// sessionid: string,
|
||||
// limit:20,
|
||||
// contract:string,
|
||||
// offset: 0
|
||||
// };
|
||||
// msgListTotalData:any;
|
||||
// msgListData: [];
|
||||
// activeJobMsgList(){
|
||||
// this.contrData = {
|
||||
// action:14011,
|
||||
// member_id: this.sessionDataProviderService.member_id,
|
||||
// uid: this.sessionDataProviderService.member_uid,
|
||||
// sessionid: this.sessionDataProviderService.session ,
|
||||
// limit:20,
|
||||
// contract: this.jobData.contract,
|
||||
// offset: 0}
|
||||
//
|
||||
// this.wrenchService.activeJobMsgList(this.contrData).subscribe(
|
||||
// msgListTotalData => {
|
||||
// this.msgListTotalData = msgListTotalData;
|
||||
// // console.log("REFER RETURN->", this.referTotalData);
|
||||
// this.msgListData = this.msgListTotalData.result_list;
|
||||
// console.log("REFER RETURN DATA->", this.msgListData);
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// }
|
||||
|
||||
/*
|
||||
'member_id' => int 1
|
||||
'sessionid' => string '936571FD2E081B667930E7FFDF4D819938171883CA0CC951DC6C4FB184280EB3' (length=64)
|
||||
'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
'message' => string 'Lorem Ipsum comes from a latin text written in 45BC by Roman statesman, lawyer, scholar, and philosopher, Marcus Tullius Cicero' (length=127)
|
||||
'msg_type' => string 'TEXT' (length=4)
|
||||
'contract' => string '49BWBRW738' (length=10)
|
||||
'action' => int 14010
|
||||
*/
|
||||
|
||||
reqData: {
|
||||
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 presentToast(amessage, position: "top" | "middle" | "bottom") {
|
||||
// const toast = await this.toastController.create({
|
||||
// message: amessage,
|
||||
// duration: 3000,
|
||||
// position: position,
|
||||
// });
|
||||
//
|
||||
// await toast.present();
|
||||
// }
|
||||
|
||||
async sendActiveJobMessage() {
|
||||
if (this.yourmessage == undefined || this.yourmessage?.length < 5) {
|
||||
//alert("Enter Message to send");
|
||||
await this.presentToast("Please enter the message to send", "middle");
|
||||
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,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
msg_type: "TEXT",
|
||||
contract: this.jobData.contract,
|
||||
message: this.yourmessage
|
||||
}
|
||||
|
||||
loading.present();
|
||||
this.wrenchService.sendTaskMessage(this.reqData).subscribe(
|
||||
reqResult => {
|
||||
loading.dismiss();
|
||||
this.msgReqResult = reqResult;
|
||||
// console.log("msgReqResult RETURN->", this.msgReqResult);
|
||||
|
||||
this.interest_msg_status = this.msgReqResult?.status;
|
||||
setTimeout(() => {
|
||||
this.interest_msg_status = '';
|
||||
}, 5000);
|
||||
this.yourmessage = '';
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
this.yourmessage = '';
|
||||
this.socketToolsService.emmitSocketEvent("send_message", this.yourmessage, this.socket_room);
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
completionRestricted() {
|
||||
const strict_timeline = this.jobData.strict_timeline;
|
||||
const minimum_due = new Date(this.jobData.minimum_due);
|
||||
|
||||
if (strict_timeline > 0) {
|
||||
const today = new Date();
|
||||
const result = (today > minimum_due);
|
||||
if (result == false) {
|
||||
const tMeassage = "This task can onlt be marked completed after " + minimum_due;
|
||||
this.presentToast(tMeassage, "middle", 5500);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async taskCompleted() {
|
||||
// alert(100);
|
||||
if (this.completionRestricted() == false) {
|
||||
return;
|
||||
}
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_COMPLETE',
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Confirm the task is completed.",
|
||||
message: "The task owner will confirm the completion acceptance or rejection soon.",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Confirm Completed ?",
|
||||
handler: () => {
|
||||
// start
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res)=> {
|
||||
if (res.status != 200 || res.data.internal_return < 0) {
|
||||
// setReqStatus({loading:false, status: false, message: 'unable to complete request. Try again'})
|
||||
// Alert("Unable to set task as completed, try again soon");
|
||||
} else {
|
||||
this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
// this.router.navigate(['mytasks']);
|
||||
// end
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
async taskCancel(){
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_CANCEL',
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res) => {
|
||||
if (res.status != 200 || res.data.internal_return < 0) {
|
||||
// setReqStatus({loading:false, status: false, message: 'unable to complete request. Try again'})
|
||||
// Alert("Unable to set task as completed, try again soon");
|
||||
} else {
|
||||
this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
// this.router.navigate(['mytasks']);
|
||||
// end
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Confirm Cancel Request.",
|
||||
message: "The task owner will be informed of this cancellation. Once completed, we cannot reverse this action.",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Confirm Cancel ?",
|
||||
handler: () => {
|
||||
async taskCancel() {
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_CANCEL',
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Confirm Cancel Request.",
|
||||
message: "The task owner will be informed of this cancellation. Once completed, we cannot reverse this action.",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Confirm Cancel ?",
|
||||
handler: () => {
|
||||
// start
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res)=> {
|
||||
if (res.status != 200 || res.data.internal_return < 0) {
|
||||
// setReqStatus({loading:false, status: false, message: 'unable to complete request. Try again'})
|
||||
// Alert("Unable to set task as completed, try again soon");
|
||||
} else {
|
||||
this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
// this.router.navigate(['mytasks']);
|
||||
// end
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
|
||||
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.Prompt // 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);
|
||||
}
|
||||
}
|
||||
|
||||
request_result:string='';
|
||||
isDisabled:boolean= false;
|
||||
async requestExtension(){
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_REQEXTENT',
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res) => {
|
||||
if (res.status != 200 || res.data.internal_return < 0) {
|
||||
// setReqStatus({loading:false, status: false, message: 'unable to complete request. Try again'})
|
||||
// Alert("Unable to set task as completed, try again soon");
|
||||
} else {
|
||||
this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
// this.router.navigate(['mytasks']);
|
||||
// end
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 2500,
|
||||
});
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Request Extensions",
|
||||
message: "Confirm you are ready to send request?",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Send Request",
|
||||
handler: () => {
|
||||
loading.present();
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res)=> {
|
||||
// debugger;
|
||||
loading.dismiss();
|
||||
if (res.result != '' || res.internal_return == 0) {
|
||||
this.request_result = res.result;
|
||||
this.isDisabled=true;
|
||||
this.tasksDataService.getJobsData();
|
||||
} else {
|
||||
// this.router.navigate(['mytasks']);
|
||||
}
|
||||
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.Prompt // 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);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
request_result: string = '';
|
||||
isDisabled: boolean = false;
|
||||
|
||||
uploadFormData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type:'FILE'
|
||||
};
|
||||
async requestExtension() {
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_REQEXTENT',
|
||||
}
|
||||
|
||||
async pickFiles (fileMode) {
|
||||
const result = await FilePicker.pickFiles({
|
||||
types: ['image/png','image/jpeg','video/mp4'],
|
||||
multiple: false,
|
||||
readData:true
|
||||
});
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 2500,
|
||||
});
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Uploading...',
|
||||
duration: 5000,
|
||||
});
|
||||
const alert = await this.alertController.create({
|
||||
header: "Request Extensions",
|
||||
message: "Confirm you are ready to send request?",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Send Request",
|
||||
handler: () => {
|
||||
loading.present();
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res) => {
|
||||
// debugger;
|
||||
loading.dismiss();
|
||||
if (res.result != '' || res.internal_return == 0) {
|
||||
this.request_result = res.result;
|
||||
this.isDisabled = true;
|
||||
this.tasksDataService.getJobsData();
|
||||
} else {
|
||||
// this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if(result){
|
||||
console.log(result);
|
||||
// debugger;
|
||||
this.uploadFormData={
|
||||
action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
msg_type:'FILE'
|
||||
};
|
||||
|
||||
console.log(this.uploadFormData);
|
||||
for (const [key, value] of Object.entries( this.uploadFormData )) {
|
||||
console.log(`${key}: ${value}`);
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
// var blob = new Blob([ result.files[0].data ], { type: result.files[0].mimeType });
|
||||
var file = new File([result.files[0].blob], result.files[0].name, {type: result.files[0].mimeType });
|
||||
uploadFormData: {
|
||||
action: number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type: 'FILE'
|
||||
};
|
||||
|
||||
async pickFiles(fileMode) {
|
||||
const result = await FilePicker.pickFiles({
|
||||
types: ['image/png', 'image/jpeg', 'video/mp4'],
|
||||
multiple: false,
|
||||
readData: true
|
||||
});
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Uploading...',
|
||||
duration: 5000,
|
||||
});
|
||||
|
||||
if (result) {
|
||||
console.log(result);
|
||||
// debugger;
|
||||
this.uploadFormData = {
|
||||
action: 14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
msg_type: 'FILE'
|
||||
};
|
||||
|
||||
console.log(this.uploadFormData);
|
||||
for (const [key, value] of Object.entries(this.uploadFormData)) {
|
||||
console.log(`${key}: ${value}`);
|
||||
}
|
||||
|
||||
// var blob = new Blob([ result.files[0].data ], { type: result.files[0].mimeType });
|
||||
var file = new File([result.files[0].blob], result.files[0].name, {type: result.files[0].mimeType});
|
||||
//return;
|
||||
await loading.present();
|
||||
this.mediaConnectService.uploadtaskFile(this.uploadFormData, file).subscribe(
|
||||
uploadResult => {
|
||||
loading.dismiss();
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.mediaConnectService.uploadFile RETURN DATA->", this.uploadFormData);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
await loading.present();
|
||||
this.mediaConnectService.uploadtaskFile(this.uploadFormData, file).subscribe(
|
||||
uploadResult => {
|
||||
loading.dismiss();
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.mediaConnectService.uploadFile RETURN DATA->", this.uploadFormData);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
async presentToast(amessage, position: 'top' | 'middle' | 'bottom', duration: number= 2500) {
|
||||
const toast = await this.toastController.create({
|
||||
message: amessage,
|
||||
duration: duration,
|
||||
position: position,
|
||||
});
|
||||
|
||||
await toast.present();
|
||||
}
|
||||
async presentToast(amessage, position: 'top' | 'middle' | 'bottom', duration: number = 2500) {
|
||||
const toast = await this.toastController.create({
|
||||
message: amessage,
|
||||
duration: duration,
|
||||
position: position,
|
||||
});
|
||||
|
||||
await toast.present();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,91 +1,99 @@
|
||||
<ion-content>
|
||||
<div class="start-pages">
|
||||
<div class="page_logo">
|
||||
<img alt="WrenchBoard" src="/assets/images/wrenchboard-line.png" />
|
||||
</div>
|
||||
|
||||
<div class="boxed_contents">
|
||||
<div *ngIf="tab == 1" class="ion-padding">
|
||||
<ion-label class="welcome_lbl">Forgot password</ion-label>
|
||||
|
||||
<ion-label class="simp_lbl"
|
||||
>Select which contact details should we use to reset your
|
||||
password:</ion-label
|
||||
>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="mail-outline"></ion-icon>
|
||||
<ion-label (click)="tab = 2">Via email</ion-label>
|
||||
<ion-icon slot="end" name="chevron-forward-outline"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="phone-portrait-outline"></ion-icon>
|
||||
<ion-label>Via sms</ion-label>
|
||||
<ion-icon slot="end" name="chevron-forward-outline"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<div *ngIf="tab == 2" class="ion-padding">
|
||||
<div class="login_box">
|
||||
<ion-label
|
||||
style="padding-top: 2px; padding-bottom: 10px"
|
||||
class="simp_lbl"
|
||||
>Forgot Password</ion-label>
|
||||
<div lines="none" style="padding-bottom: 15px;">
|
||||
<div>Enter your registered email</div>
|
||||
</div>
|
||||
<div lines="none" style="margin-bottom: 1px; display: flex; flex-direction: row">
|
||||
<div style="padding: 5px;">
|
||||
<ion-icon style="font-size: 24px;" slot="start" name="mail-outline"></ion-icon>
|
||||
</div>
|
||||
|
||||
<ion-input
|
||||
type="email"
|
||||
class="login_entry"
|
||||
placeholder="Your username"
|
||||
maxlength="35"
|
||||
[(ngModel)]="username"
|
||||
></ion-input>
|
||||
</div>
|
||||
|
||||
<ion-button (click)="onEnterEmail()" expand="block">
|
||||
Continue
|
||||
</ion-button>
|
||||
<div class="start-pages">
|
||||
<div class="page_logo">
|
||||
<img alt="WrenchBoard" src="/assets/images/wrenchboard-line.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center_contents">
|
||||
<ion-label
|
||||
style="padding-top: 2px; padding-bottom: 5px; font-size: 14px; font-weight: bolder"
|
||||
class="simp_lbl"
|
||||
>Forgot password
|
||||
</ion-label>
|
||||
</div>
|
||||
<div class="boxed_contents">
|
||||
<div *ngIf="tab == 1" class="ion-padding">
|
||||
<!-- <ion-label class="welcome_lbl">Forgot password</ion-label>-->
|
||||
|
||||
<div *ngIf="tab == 3" class="ion-padding">
|
||||
<ion-label class="welcome_lbl">Forgot password</ion-label>
|
||||
<ion-label class="simp_lbl"
|
||||
>Select which contact details should we use to reset your
|
||||
password:
|
||||
</ion-label
|
||||
>
|
||||
|
||||
<ion-label class="simp_lbl"
|
||||
>Code has been sent to the your registered email</ion-label
|
||||
>
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="mail-outline"></ion-icon>
|
||||
<ion-label (click)="tab = 2">Via email</ion-label>
|
||||
<ion-icon slot="end" name="chevron-forward-outline"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input
|
||||
type="text"
|
||||
placeholder="Enter Code"
|
||||
maxlength="10"
|
||||
[(ngModel)]="reset_pin"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="phone-portrait-outline"></ion-icon>
|
||||
<ion-label>Via sms</ion-label>
|
||||
<ion-icon slot="end" name="chevron-forward-outline"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<ion-button (click)="onCompleteReset()" expand="block">
|
||||
Continue
|
||||
</ion-button>
|
||||
</div>
|
||||
<div
|
||||
class="bottom"
|
||||
style="padding: 5px 30px 5px 10px; font-weight: bolder"
|
||||
>
|
||||
<ion-label class="last_lbl"
|
||||
>Already have an account?
|
||||
<span style="color: #4b5dfa" (click)="onLogin()"
|
||||
>Login</span
|
||||
></ion-label
|
||||
>
|
||||
</div>
|
||||
<div *ngIf="tab == 2" class="ion-padding">
|
||||
<div class="login_box">
|
||||
<!-- <ion-label-->
|
||||
<!-- style="padding-top: 2px; padding-bottom: 10px"-->
|
||||
<!-- class="simp_lbl"-->
|
||||
<!-- >Forgot Password</ion-label>-->
|
||||
<div lines="none" style="padding-bottom: 15px;">
|
||||
<div>Enter your registered email</div>
|
||||
</div>
|
||||
<div lines="none" style="margin-bottom: 1px; display: flex; flex-direction: row">
|
||||
<div style="padding: 5px;">
|
||||
<ion-icon style="font-size: 24px;" slot="start" name="mail-outline"></ion-icon>
|
||||
</div>
|
||||
|
||||
<ion-input
|
||||
type="email"
|
||||
class="login_entry"
|
||||
placeholder="Your username"
|
||||
maxlength="35"
|
||||
[(ngModel)]="username"
|
||||
></ion-input>
|
||||
</div>
|
||||
|
||||
<ion-button (click)="onEnterEmail()" expand="block">
|
||||
Continue
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="tab == 3" class="ion-padding">
|
||||
<ion-label class="welcome_lbl">Forgot password</ion-label>
|
||||
|
||||
<ion-label class="simp_lbl"
|
||||
>Code has been sent to the your registered email
|
||||
</ion-label
|
||||
>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input
|
||||
type="text"
|
||||
placeholder="Enter Code"
|
||||
maxlength="10"
|
||||
[(ngModel)]="reset_pin"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-button (click)="onCompleteReset()" expand="block">
|
||||
Continue
|
||||
</ion-button>
|
||||
</div>
|
||||
<div
|
||||
class="bottom"
|
||||
style="padding: 5px 30px 5px 10px; font-weight: bolder"
|
||||
>
|
||||
<ion-label class="last_lbl"
|
||||
>Already have an account?
|
||||
<span style="color: #4b5dfa" (click)="onLogin()"
|
||||
>Login</span
|
||||
></ion-label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {LoadingController, NavController} from "@ionic/angular";
|
||||
import {LoadingController, NavController, ToastController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -9,212 +9,227 @@ import {FilePicker} from "@capawesome/capacitor-file-picker";
|
||||
import {MediaConnectService} from "../../services/media-connect.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-jobactive',
|
||||
templateUrl: './jobactive.page.html',
|
||||
styleUrls: ['./jobactive.page.scss'],
|
||||
selector: 'app-jobactive',
|
||||
templateUrl: './jobactive.page.html',
|
||||
styleUrls: ['./jobactive.page.scss'],
|
||||
})
|
||||
export class JobactivePage implements OnInit {
|
||||
@ViewChild('yourmessage') yourmessage;
|
||||
@ViewChild('yourmessage') yourmessage;
|
||||
|
||||
jobData: any;
|
||||
tabs = 'message';
|
||||
item_banner:string = 'default.jpg';
|
||||
session_image_server:string='';
|
||||
curr_session:string='';
|
||||
socket_room:string='';
|
||||
jobData: any;
|
||||
tabs = 'message';
|
||||
item_banner: string = 'default.jpg';
|
||||
session_image_server: string = '';
|
||||
curr_session: string = '';
|
||||
socket_room: string = '';
|
||||
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private socketToolsService: SocketToolsService,
|
||||
private loadingCtrl: LoadingController,
|
||||
private mediaConnectService: MediaConnectService
|
||||
) {
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
this.item_banner = this.jobData.banner;
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private socketToolsService: SocketToolsService,
|
||||
private toastController: ToastController,
|
||||
private loadingCtrl: LoadingController,
|
||||
private mediaConnectService: MediaConnectService
|
||||
) {
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
this.item_banner = this.jobData.banner;
|
||||
|
||||
if ( this.jobData == undefined){
|
||||
this.onBack();
|
||||
}
|
||||
// debugger;
|
||||
this.socket_room = `${this.jobData.contract}-${this.jobData.contract_uid}`;
|
||||
this.socketToolsService.joinSocketRoom(this.socket_room );
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
//this.activeJobMsgList();
|
||||
}
|
||||
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
|
||||
reqData: {
|
||||
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.reqData = {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.reqData).subscribe(
|
||||
reqResult => {
|
||||
this.msgReqResult = reqResult;
|
||||
console.log("msgReqResult RETURN->", this.msgReqResult);
|
||||
this.interest_msg_status = this.msgReqResult?.status;
|
||||
this.yourmessage = '';
|
||||
//this.activeJobMsgList();
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
//alert(this.socket_room);
|
||||
// debugger;
|
||||
this.socketToolsService.emmitSocketEvent("send_message",this.yourmessage, this.socket_room);
|
||||
if (this.jobData == undefined) {
|
||||
this.onBack();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
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.Prompt // 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);
|
||||
// debugger;
|
||||
this.socket_room = `${this.jobData.contract}-${this.jobData.contract_uid}`;
|
||||
this.socketToolsService.joinSocketRoom(this.socket_room);
|
||||
}
|
||||
}
|
||||
uploadFormData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type:'FILE'
|
||||
};
|
||||
|
||||
async pickFiles (fileMode) {
|
||||
const result = await FilePicker.pickFiles({
|
||||
types: ['image/png','image/jpeg','video/mp4'],
|
||||
multiple: false,
|
||||
readData:true
|
||||
});
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Uploading...',
|
||||
duration: 5000,
|
||||
});
|
||||
ngOnInit() {
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
//this.activeJobMsgList();
|
||||
}
|
||||
|
||||
if(result){
|
||||
console.log(result);
|
||||
// debugger;
|
||||
this.uploadFormData={
|
||||
action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
msg_type:'FILE'
|
||||
};
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
console.log(this.uploadFormData);
|
||||
for (const [key, value] of Object.entries( this.uploadFormData )) {
|
||||
console.log(`${key}: ${value}`);
|
||||
}
|
||||
|
||||
var blob = new Blob([ result.files[0].data ], { type: result.files[0].mimeType });
|
||||
var file = new File([blob], result.files[0].name, {type: result.files[0].mimeType });
|
||||
reqData: {
|
||||
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 presentToast(amessage, position: 'top' | 'middle' | 'bottom', duration: number = 2500) {
|
||||
const toast = await this.toastController.create({
|
||||
message: amessage,
|
||||
duration: duration,
|
||||
position: position,
|
||||
});
|
||||
|
||||
await toast.present();
|
||||
}
|
||||
|
||||
async sendActiveJobMessage() {
|
||||
if (this.yourmessage == undefined || this.yourmessage?.length < 5) {
|
||||
await this.presentToast("Please enter the message to send", "middle");
|
||||
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,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
msg_type: "TEXT",
|
||||
contract: this.jobData.contract,
|
||||
message: this.yourmessage
|
||||
}
|
||||
|
||||
loading.present();
|
||||
this.wrenchService.sendTaskMessage(this.reqData).subscribe(
|
||||
reqResult => {
|
||||
this.msgReqResult = reqResult;
|
||||
console.log("msgReqResult RETURN->", this.msgReqResult);
|
||||
this.interest_msg_status = this.msgReqResult?.status;
|
||||
this.yourmessage = '';
|
||||
//this.activeJobMsgList();
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
//alert(this.socket_room);
|
||||
// debugger;
|
||||
this.socketToolsService.emmitSocketEvent("send_message", this.yourmessage, this.socket_room);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
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.Prompt // 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);
|
||||
}
|
||||
}
|
||||
|
||||
uploadFormData: {
|
||||
action: number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type: 'FILE'
|
||||
};
|
||||
|
||||
async pickFiles(fileMode) {
|
||||
const result = await FilePicker.pickFiles({
|
||||
types: ['image/png', 'image/jpeg', 'video/mp4'],
|
||||
multiple: false,
|
||||
readData: true
|
||||
});
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Uploading...',
|
||||
duration: 5000,
|
||||
});
|
||||
|
||||
if (result) {
|
||||
console.log(result);
|
||||
// debugger;
|
||||
this.uploadFormData = {
|
||||
action: 14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
msg_type: 'FILE'
|
||||
};
|
||||
|
||||
console.log(this.uploadFormData);
|
||||
for (const [key, value] of Object.entries(this.uploadFormData)) {
|
||||
console.log(`${key}: ${value}`);
|
||||
}
|
||||
|
||||
var blob = new Blob([result.files[0].data], {type: result.files[0].mimeType});
|
||||
var file = new File([blob], result.files[0].name, {type: result.files[0].mimeType});
|
||||
//return;
|
||||
await loading.present();
|
||||
this.mediaConnectService.uploadtaskFile(this.uploadFormData, file).subscribe(
|
||||
uploadResult => {
|
||||
loading.dismiss();
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.mediaConnectService.uploadFile RETURN DATA->", this.uploadFormData);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
await loading.present();
|
||||
this.mediaConnectService.uploadtaskFile(this.uploadFormData, file).subscribe(
|
||||
uploadResult => {
|
||||
loading.dismiss();
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.mediaConnectService.uploadFile RETURN DATA->", this.uploadFormData);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,18 +6,19 @@
|
||||
<div *ngIf="loginType==='normal';">
|
||||
<div class="ion-padding space">
|
||||
<div>
|
||||
<!-- <ion-label class="simp_lbl">Login to continue</ion-label>-->
|
||||
<div class="center_contents">
|
||||
<ion-label
|
||||
style="padding-top: 2px; padding-bottom: 5px; font-size: 14px; font-weight: bolder"
|
||||
class="simp_lbl"
|
||||
>Welcome back
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="boxed_contents">
|
||||
|
||||
|
||||
<div class="login_box">
|
||||
<ion-label
|
||||
style="padding-top: 2px; padding-bottom: 10px"
|
||||
class="simp_lbl"
|
||||
>Welcome back
|
||||
</ion-label
|
||||
>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="mail-outline"></ion-icon>
|
||||
<ion-input
|
||||
@@ -54,16 +55,18 @@
|
||||
(click)="startLogin()"
|
||||
[disabled]="isDisabled"
|
||||
>
|
||||
<span style="font-weight: bolder;">Login</span>
|
||||
<span style="font-weight: bolder; padding: 0px; ">Login</span>
|
||||
</ion-button>
|
||||
</div>
|
||||
<div style="color: red;">{{login_response}}</div>
|
||||
</div>
|
||||
<ion-label class="forgot_lbl" (click)="onForgot()"
|
||||
>Forgot your password ?
|
||||
</ion-label
|
||||
>
|
||||
<div *ngIf="showSocial == true ">
|
||||
<div style="padding-top: 10px; font-weight: bolder">
|
||||
<ion-label class="forgot_lbl" (click)="onForgot()"
|
||||
>Forgot your password ?
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 10px;" *ngIf="showSocial == true ">
|
||||
<ion-label class="or">Or Continue With</ion-label>
|
||||
<div class="button">
|
||||
<ion-buttons>
|
||||
|
||||
@@ -1,30 +1,33 @@
|
||||
ion-content {
|
||||
.family_box{
|
||||
.family_box {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.login-type22{
|
||||
font-weight: bolder;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.pending-buttom{
|
||||
.login-type22 {
|
||||
font-weight: bolder;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.pending-buttom {
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.simp_lbl_tx{
|
||||
.simp_lbl_tx {
|
||||
margin-top: 10px;
|
||||
font-size: 20px;
|
||||
letter-spacing: 1.2px;
|
||||
margin-bottom: 10px;
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
.login-type{
|
||||
|
||||
.login-type {
|
||||
background-color: #3dc2ff;
|
||||
border-radius: 10px;
|
||||
height: 50px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
|
||||
ion-item {
|
||||
--background: #f7f7f7;
|
||||
border-radius: 10px;
|
||||
|
||||
+537
-522
File diff suppressed because it is too large
Load Diff
@@ -1,145 +1,153 @@
|
||||
<ion-content class="no-scroll" style="padding: 0">
|
||||
<div class="start-pages">
|
||||
<div class="page_logo" style="padding-top: 15px">
|
||||
<img alt="WrenchBoard" src="/assets/images/wrenchboard-line.png" />
|
||||
</div>
|
||||
<div class="boxed_contents">
|
||||
<div class="ion-padding space">
|
||||
<div *ngIf="signup_state==1; then startBlock"></div>
|
||||
<div *ngIf="signup_state==2; then secondBlock"></div>
|
||||
<ng-template #startBlock>
|
||||
<div>
|
||||
<div class="login_box">
|
||||
<ion-label
|
||||
style="padding-top: 2px; padding-bottom: 10px"
|
||||
class="simp_lbl"
|
||||
>Get Started</ion-label
|
||||
>
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="flag-outline"></ion-icon>
|
||||
<ion-select
|
||||
style="width: 100%; padding-left: 10px"
|
||||
class="login_entry"
|
||||
(ionChange)="verReg()"
|
||||
label="Select Country"
|
||||
placeholder="Select Country"
|
||||
[(ngModel)]="country"
|
||||
>
|
||||
<ion-select-option
|
||||
*ngFor="let item of signupCountry"
|
||||
value="{{item.code}}"
|
||||
>{{item.country}}</ion-select-option
|
||||
>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<div class="start-pages">
|
||||
<div class="page_logo" style="padding-top: 15px">
|
||||
<img alt="WrenchBoard" src="/assets/images/wrenchboard-line.png"/>
|
||||
</div>
|
||||
<div class="boxed_contents">
|
||||
<div class="ion-padding space">
|
||||
<div *ngIf="signup_state==1; then startBlock"></div>
|
||||
<div *ngIf="signup_state==2; then secondBlock"></div>
|
||||
<ng-template #startBlock>
|
||||
<div>
|
||||
<div class="center_contents">
|
||||
<ion-label
|
||||
style="padding-top: 2px; padding-bottom: 5px; font-size: 14px; font-weight: bolder"
|
||||
class="simp_lbl"
|
||||
>Get Started
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="person-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
maxlength="25"
|
||||
(ionChange)="verReg()"
|
||||
type="firstname"
|
||||
placeholder="Firstname"
|
||||
[(ngModel)]="firstname"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
<div class="login_box">
|
||||
<!-- <ion-label-->
|
||||
<!-- style="padding-top: 2px; padding-bottom: 10px"-->
|
||||
<!-- class="simp_lbl"-->
|
||||
<!-- ></ion-label-->
|
||||
<!-- >-->
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="flag-outline"></ion-icon>
|
||||
<ion-select
|
||||
style="width: 100%; padding-left: 10px"
|
||||
class="login_entry"
|
||||
(ionChange)="verReg()"
|
||||
label="Select Country"
|
||||
placeholder="Select Country"
|
||||
[(ngModel)]="country"
|
||||
>
|
||||
<ion-select-option
|
||||
*ngFor="let item of signupCountry"
|
||||
value="{{item.code}}"
|
||||
>{{item.country}}</ion-select-option
|
||||
>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="person-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
maxlength="25"
|
||||
(ionChange)="verReg()"
|
||||
type="lastname"
|
||||
placeholder="Lastname"
|
||||
[(ngModel)]="lastname"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="person-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
maxlength="25"
|
||||
(ionChange)="verReg()"
|
||||
type="firstname"
|
||||
placeholder="Firstname"
|
||||
[(ngModel)]="firstname"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="mail-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
(ionChange)="verReg()"
|
||||
type="username"
|
||||
maxlength="35"
|
||||
placeholder="Email (Your Username)"
|
||||
[(ngModel)]="username"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="person-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
maxlength="25"
|
||||
(ionChange)="verReg()"
|
||||
type="lastname"
|
||||
placeholder="Lastname"
|
||||
[(ngModel)]="lastname"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none" style="margin-bottom: 0px">
|
||||
<ion-icon slot="start" name="lock-closed-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
(ionChange)="verReg()"
|
||||
type="password"
|
||||
placeholder="Password (8 chars. minimum)"
|
||||
maxlength="15"
|
||||
[(ngModel)]="password"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
<ion-item
|
||||
lines="none"
|
||||
style="margin-bottom: 10px; padding-left: 50px"
|
||||
>
|
||||
<div>.</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none" style="margin-bottom: 10px">
|
||||
<ion-icon slot="start" name="mail-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
(ionChange)="verReg()"
|
||||
type="username"
|
||||
maxlength="35"
|
||||
placeholder="Email (Your Username)"
|
||||
[(ngModel)]="username"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-button
|
||||
expand="block"
|
||||
[disabled]="isDisabled"
|
||||
(click)="onFillProfile()"
|
||||
>
|
||||
Register
|
||||
</ion-button>
|
||||
</div>
|
||||
<ion-item lines="none" style="margin-bottom: 0px">
|
||||
<ion-icon slot="start" name="lock-closed-outline"></ion-icon>
|
||||
<ion-input
|
||||
class="login_entry"
|
||||
(ionChange)="verReg()"
|
||||
type="password"
|
||||
placeholder="Password (8 chars. minimum)"
|
||||
maxlength="15"
|
||||
[(ngModel)]="password"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
<ion-item
|
||||
lines="none"
|
||||
style="margin-bottom: 10px; padding-left: 50px"
|
||||
>
|
||||
<div>.</div>
|
||||
</ion-item>
|
||||
|
||||
<div *ngIf="showSocial == true ">
|
||||
<ion-label class="or">Or Continue With</ion-label>
|
||||
<ion-button
|
||||
expand="block"
|
||||
[disabled]="isDisabled"
|
||||
(click)="onFillProfile()"
|
||||
>
|
||||
Register
|
||||
</ion-button>
|
||||
</div>
|
||||
|
||||
<div class="button">
|
||||
<ion-buttons>
|
||||
<ion-button>
|
||||
<ion-icon name="logo-facebook"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<div *ngIf="showSocial == true ">
|
||||
<ion-label class="or">Or Continue With</ion-label>
|
||||
|
||||
<ion-buttons>
|
||||
<ion-button>
|
||||
<ion-icon name="logo-google"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<div class="button">
|
||||
<ion-buttons>
|
||||
<ion-button>
|
||||
<ion-icon name="logo-facebook"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
<ion-buttons>
|
||||
<ion-button>
|
||||
<ion-icon name="logo-twitter"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #secondBlock>
|
||||
<div>
|
||||
<ion-label class="simp_lbl">Complete Account</ion-label>
|
||||
<div class="login_box">
|
||||
<ion-grid style="margin-top: 15px">
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Country</ion-col>
|
||||
<ion-col size="9">{{signup_country}}</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Username</ion-col>
|
||||
<ion-col size="9">{{signup_username}}</ion-col>
|
||||
</ion-row>
|
||||
<ion-buttons>
|
||||
<ion-button>
|
||||
<ion-icon name="logo-google"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-label
|
||||
class="or"
|
||||
style="
|
||||
<ion-buttons>
|
||||
<ion-button>
|
||||
<ion-icon name="logo-twitter"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #secondBlock>
|
||||
<div>
|
||||
<ion-label class="simp_lbl">Complete Account</ion-label>
|
||||
<div class="login_box">
|
||||
<ion-grid style="margin-top: 15px">
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Country</ion-col>
|
||||
<ion-col size="9">{{signup_country}}</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Username</ion-col>
|
||||
<ion-col size="9">{{signup_username}}</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-label
|
||||
class="or"
|
||||
style="
|
||||
width: 100%;
|
||||
background-color: #f5eff4;
|
||||
color: red;
|
||||
@@ -149,71 +157,72 @@
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
"
|
||||
>Enter Confirmation Received In Email</ion-label
|
||||
>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
>Enter Confirmation Received In Email
|
||||
</ion-label
|
||||
>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="4" class="side_lb">
|
||||
Verification Code :
|
||||
</ion-col>
|
||||
<ion-col size="8">
|
||||
<!-- <ion-icon slot="start" name="mail-outline"></ion-icon>-->
|
||||
<ion-input
|
||||
type="text"
|
||||
autocomplete="false"
|
||||
class="login_entry"
|
||||
(ionChange)="verReg2()"
|
||||
placeholder="Random text"
|
||||
maxlength="8"
|
||||
[(ngModel)]="random_text"
|
||||
></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col size="4" class="side_lb">Password</ion-col>
|
||||
<ion-col size="8">
|
||||
<ion-icon
|
||||
slot="start"
|
||||
name="lock-closed-outline"
|
||||
></ion-icon>
|
||||
<ion-input
|
||||
type="password"
|
||||
class="login_entry"
|
||||
(ionChange)="verReg2()"
|
||||
placeholder="Password"
|
||||
maxlength="15"
|
||||
[(ngModel)]="password"
|
||||
></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col size="4" class="side_lb">
|
||||
Verification Code :
|
||||
</ion-col>
|
||||
<ion-col size="8">
|
||||
<!-- <ion-icon slot="start" name="mail-outline"></ion-icon>-->
|
||||
<ion-input
|
||||
type="text"
|
||||
autocomplete="false"
|
||||
class="login_entry"
|
||||
(ionChange)="verReg2()"
|
||||
placeholder="Random text"
|
||||
maxlength="8"
|
||||
[(ngModel)]="random_text"
|
||||
></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col size="4" class="side_lb">Password</ion-col>
|
||||
<ion-col size="8">
|
||||
<ion-icon
|
||||
slot="start"
|
||||
name="lock-closed-outline"
|
||||
></ion-icon>
|
||||
<ion-input
|
||||
type="password"
|
||||
class="login_entry"
|
||||
(ionChange)="verReg2()"
|
||||
placeholder="Password"
|
||||
maxlength="15"
|
||||
[(ngModel)]="password"
|
||||
></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="4"></ion-col>
|
||||
<ion-col size="8" style="text-align: right">
|
||||
<ion-button
|
||||
expand="block"
|
||||
[disabled]="isDisabled2"
|
||||
(click)="onCompleteProfile()"
|
||||
<ion-row>
|
||||
<ion-col size="4"></ion-col>
|
||||
<ion-col size="8" style="text-align: right">
|
||||
<ion-button
|
||||
expand="block"
|
||||
[disabled]="isDisabled2"
|
||||
(click)="onCompleteProfile()"
|
||||
>
|
||||
Complete Signup
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
<!-- <ion-col size="2"></ion-col>-->
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div class="bottom">
|
||||
<ion-label class="last_lbl"
|
||||
>Already have an account?
|
||||
<span (click)="onLogin()">Login</span></ion-label
|
||||
>
|
||||
Complete Signup
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
<!-- <ion-col size="2"></ion-col>-->
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div class="bottom">
|
||||
<ion-label class="last_lbl"
|
||||
>Already have an account?
|
||||
<span (click)="onLogin()">Login</span></ion-label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -57,6 +57,13 @@ ion-label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.center_contents {
|
||||
max-width: 550px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
|
||||
.bg_image {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
|
||||
Reference in New Issue
Block a user