This commit is contained in:
CHIEFSOFT\ameye
2024-01-18 21:20:18 -05:00
parent f6968b0286
commit b1d9e3b1d3
2 changed files with 12 additions and 12 deletions
@@ -69,13 +69,9 @@
<ion-grid style="background-color: aliceblue;margin-top: 15px;">
<ion-row>
<ion-col>
<!-- <ion-button-->
<!-- (click)="setCloseModal()"-->
<!-- shape="round"-->
<!-- size="small"-->
<!-- color="danger">-->
<!-- Close-->
<!-- </ion-button>-->
<div style="font-weight: bolder; color: #8b198e;" *ngIf="result_message !='' ">
{{result_message}}
</div>
</ion-col>
<ion-col></ion-col>
<ion-col>
@@ -19,6 +19,7 @@ export class AddJobsComponent implements OnInit {
@ViewChild('country') country:any;
durationArray:any;
curr_session:string='';
result_message:string='';
isDisabled:boolean=true;
@@ -39,8 +40,6 @@ export class AddJobsComponent implements OnInit {
}
verifyEntry() {
this.isDisabled = !(this.title.length > 5 &&
this.description.length > 5 &&
this.job_detail.length > 10 &&
@@ -48,6 +47,7 @@ export class AddJobsComponent implements OnInit {
this.price > 0 &&
this.country.length > 1);
}
async processCreateJob(){
const loading = await this.loadingCtrl.create({
message: 'Creating Job...',
@@ -72,20 +72,24 @@ export class AddJobsComponent implements OnInit {
}
loading.present();
this.isDisabled = true;
this.wrenchService.jobManagerCreateJob(this.reqData).subscribe(
jobManagerCreateResult => {
loading.dismiss();
this.jobManagerCreateResult = jobManagerCreateResult;
console.log("jobManagerCreateResult RETURN->", this.jobManagerCreateResult);
if (this.jobManagerCreateResult !=null && this.jobManagerCreateResult.job_uid != '' ){
alert("Job Created");
this.result_message = "Job Added";
setTimeout(()=>{
dispatchEvent(new Event("app_add_jobs"));
}, 3000);
}
else{
alert("Unable to create job");
this.result_message ="Error - Unable to Create Job";
setTimeout(()=>{
this.result_message ="";
}, 3000);
}
}
);