From cbd79ab3613e13b681307a94f7e3858694a2f418 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 18 Jan 2024 12:56:08 -0500 Subject: [PATCH] add job --- .../add-jobs/add-jobs.component.html | 177 ++++++++---------- .../components/add-jobs/add-jobs.component.ts | 43 ++++- src/app/pages/joblist/joblist.page.html | 8 +- .../store/session-data-provider.service.ts | 13 ++ 4 files changed, 131 insertions(+), 110 deletions(-) diff --git a/src/app/components/add-jobs/add-jobs.component.html b/src/app/components/add-jobs/add-jobs.component.html index 3a5d1b2..7b3a62b 100644 --- a/src/app/components/add-jobs/add-jobs.component.html +++ b/src/app/components/add-jobs/add-jobs.component.html @@ -1,112 +1,85 @@
- - + + + + + + + + + - - + + + {{item.name}} + - - + + + + + + + + {{item.code}} + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + Create Job + + + + diff --git a/src/app/components/add-jobs/add-jobs.component.ts b/src/app/components/add-jobs/add-jobs.component.ts index 8a8c794..a70b046 100644 --- a/src/app/components/add-jobs/add-jobs.component.ts +++ b/src/app/components/add-jobs/add-jobs.component.ts @@ -1,5 +1,6 @@ -import { Component, OnInit } from '@angular/core'; - +import {Component, OnInit, ViewChild} from '@angular/core'; +import {SessionDataProviderService} from "../../store/session-data-provider.service"; +import {UserWalletService} from "../../store/user-wallet.service"; @Component({ selector: 'app-add-jobs', templateUrl: './add-jobs.component.html', @@ -7,8 +8,42 @@ import { Component, OnInit } from '@angular/core'; }) export class AddJobsComponent implements OnInit { - constructor() { } + @ViewChild('title') title:any; + @ViewChild('description') description: any; + @ViewChild('job_detail') job_detail: any; + @ViewChild('timeline_days') timeline_days: any; + @ViewChild('currency') currency:any; + @ViewChild('price') price:any; + @ViewChild('country') country:any; + durationArray:any; - ngOnInit() {} + isDisabled:boolean=true; + constructor( + public sessionDataProviderService: SessionDataProviderService, + public userWalletService: UserWalletService + ) { + this.durationArray = this.sessionDataProviderService.durationArray; + this.walletResult = this.userWalletService.walletResult.result_list; + } + + walletResult:any; + walletData: []; + ngOnInit() { + this.walletResult = this.userWalletService.walletResult.result_list; + } + + verifyEntry() { + + + this.isDisabled = !(this.title.length > 5 && + this.description.length > 5 && + this.job_detail.length > 10 && + this.timeline_days > 0 && + this.price > 0 && + this.country.length > 1); + } + processCreateJob(){ + + } } diff --git a/src/app/pages/joblist/joblist.page.html b/src/app/pages/joblist/joblist.page.html index 1fb1013..a718e4e 100644 --- a/src/app/pages/joblist/joblist.page.html +++ b/src/app/pages/joblist/joblist.page.html @@ -120,10 +120,10 @@ - Create Job + + + + diff --git a/src/app/store/session-data-provider.service.ts b/src/app/store/session-data-provider.service.ts index 56d179c..a787624 100644 --- a/src/app/store/session-data-provider.service.ts +++ b/src/app/store/session-data-provider.service.ts @@ -102,6 +102,19 @@ export class SessionDataProviderService { [ 12, 'December'] ]; } + + durationArray = [ + { duration: 1, name: "1 day" }, + { duration: 2, name: "2 days" }, + { duration: 3, name: "3 days" }, + { duration: 4, name: "4 days" }, + { duration: 5, name: "5 days" }, + { duration: 6, name: "6 days" }, + { duration: 7, name: "1 week" }, + { duration: 14, name: "2 weeks" }, + { duration: 21, name: "3 weeks" }, + { duration: 28, name: "4 weeks" }, + ]; getChildAddYears(){ var currY = new Date().getFullYear(); var arrY = [];