owners job
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
|
||||
<ion-grid>
|
||||
<ion-row style="background-color: #f1ecec; border-radius: 10px">
|
||||
<ion-col size="4" class="side_lb">Depends on</ion-col>
|
||||
<ion-col size="4" class="side_lb">Depends on :</ion-col>
|
||||
<ion-col size="8">
|
||||
<ion-select
|
||||
interface="popover"
|
||||
@@ -80,7 +80,7 @@
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="4" class="side_lb">Duration</ion-col>
|
||||
<ion-col size="4" class="side_lb">Duration :</ion-col>
|
||||
<ion-col size="8">
|
||||
<ion-select
|
||||
class="job_duration"
|
||||
@@ -89,7 +89,6 @@
|
||||
interface="popover"
|
||||
>
|
||||
<ion-select-option value="0" selected="true">Select Duration</ion-select-option>
|
||||
<ion-select-option value="1">1 Day</ion-select-option>
|
||||
<ion-select-option value="2">2 Days</ion-select-option>
|
||||
<ion-select-option value="3">3 Days</ion-select-option>
|
||||
<ion-select-option value="4">4 Days</ion-select-option>
|
||||
@@ -104,6 +103,22 @@
|
||||
</ion-select>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="4" class="side_lb">Timeline :</ion-col>
|
||||
<ion-col size="8">
|
||||
<ion-select
|
||||
value="{{strict_timeline}}"
|
||||
class="job_duration"
|
||||
[(ngModel)]='strict_timeline'
|
||||
label="Duration"
|
||||
interface="popover"
|
||||
>
|
||||
<ion-select-option value="0" >Not Strict</ion-select-option>
|
||||
<ion-select-option value="1">Strict Timeline</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col>-->
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {LoadingController, NavController} from "@ionic/angular";
|
||||
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";
|
||||
@@ -15,6 +15,7 @@ export class OwnersjobPage implements OnInit {
|
||||
@ViewChild('job_duration') job_duration;
|
||||
@ViewChild('job_recipient') job_recipient;
|
||||
@ViewChild('depend_uid') depend_uid;
|
||||
@ViewChild('strict_timeline') strict_timeline;
|
||||
|
||||
|
||||
jobData: any;
|
||||
@@ -30,6 +31,7 @@ export class OwnersjobPage implements OnInit {
|
||||
private socketToolsService: SocketToolsService,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private alertController: AlertController,
|
||||
private loadingCtrl: LoadingController,
|
||||
public jobgroupDataService: JobgroupDataService
|
||||
) {
|
||||
@@ -86,7 +88,8 @@ export class OwnersjobPage implements OnInit {
|
||||
duration: 0,
|
||||
job_description: this.jobData.description,
|
||||
email: this.job_recipient,
|
||||
assign_mode: 110033
|
||||
assign_mode: 110033,
|
||||
strict_timeline: this.strict_timeline
|
||||
};
|
||||
// console.log('XXX-> ', this.reqData );
|
||||
|
||||
@@ -131,7 +134,8 @@ export class OwnersjobPage implements OnInit {
|
||||
duration: number,
|
||||
job_description: string,
|
||||
email:string,
|
||||
assign_mode: number
|
||||
assign_mode: number,
|
||||
strict_timeline:number
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -148,12 +152,20 @@ export class OwnersjobPage implements OnInit {
|
||||
|
||||
async sendOfferToMarket(){
|
||||
if ( this.job_duration== undefined || this.job_duration < 1){
|
||||
alert("Select Duration");
|
||||
// alert("Select Duration");
|
||||
await this.showAlert("Assign Error", "Select Duration");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( this.strict_timeline== undefined || this.strict_timeline <0){
|
||||
// alert("Select Duration");
|
||||
await this.showAlert("Assign Error","Select how strict you want the approval timeline to be");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( this.jobData.job_uid == this.depend_uid ){
|
||||
alert("A task cannot depend on itself");
|
||||
// alert("A task cannot depend on itself");
|
||||
await this.showAlert("Assign Error", "A task cannot depend on itself");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -169,7 +181,8 @@ export class OwnersjobPage implements OnInit {
|
||||
duration: this.job_duration,
|
||||
job_description: this.jobData.description,
|
||||
email: '',
|
||||
assign_mode: 110022
|
||||
assign_mode: 110022,
|
||||
strict_timeline: this.strict_timeline
|
||||
};
|
||||
// console.log('XXX-> ', this.reqData );
|
||||
//debugger;
|
||||
@@ -209,7 +222,18 @@ export class OwnersjobPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async showAlert(mtitle: string, amessage: string) {
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: 'WrenchBoard',
|
||||
subHeader: mtitle,
|
||||
message: amessage,
|
||||
buttons: ['OK'],
|
||||
});
|
||||
|
||||
await alert.present();
|
||||
|
||||
}
|
||||
|
||||
// assignTask(reqData){
|
||||
// return this.getPostData("assigntask", reqData);
|
||||
|
||||
Reference in New Issue
Block a user