add job
This commit is contained in:
@@ -1,112 +1,85 @@
|
||||
|
||||
|
||||
<div>
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Title"
|
||||
style="background-color: aliceblue; border-radius: 10px; padding-left: 1px;"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='firstname' ></ion-input>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-textarea label="Title"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='title'
|
||||
maxlength="20"
|
||||
placeholder="Enter Title"></ion-textarea>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-textarea label="Description"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='description'
|
||||
maxlength="20"
|
||||
labelPlacement="stacked"
|
||||
placeholder="Job Description"></ion-textarea>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-textarea label="Delivery Details"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='job_detail'
|
||||
style="min-height: 150px;"
|
||||
maxlength="20"
|
||||
labelPlacement="floating"
|
||||
placeholder="Delivery Details"></ion-textarea>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Description"
|
||||
style="background-color: aliceblue; border-radius: 10px; padding-left: 1px;"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='lastname' ></ion-input>
|
||||
<ion-item>
|
||||
<ion-select
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='timeline_days'
|
||||
label="Timeline (expected duration)"
|
||||
label-placement="stacked">
|
||||
<ion-select-option *ngFor="let item of durationArray" value="{{item.duration}}">{{item.name}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Delivery Details"
|
||||
style="background-color: aliceblue; border-radius: 10px; padding-left: 1px;"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='email' ></ion-input>
|
||||
<ion-item>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-input label="Price"
|
||||
[(ngModel)]='price'
|
||||
(ionChange)="verifyEntry()"
|
||||
style="text-align: right;"
|
||||
placeholder="0.00"></ion-input>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-select
|
||||
(ionChange)="verifyEntry()"
|
||||
style="min-width: 100px;"
|
||||
[(ngModel)]='country'
|
||||
label="Currency">
|
||||
<ion-select-option *ngFor="let item of walletResult;" value="{{item.country}}">{{item.code}}</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-item>
|
||||
<!-- <ion-item lines="none">-->
|
||||
<!-- <ion-label>Birthday(Year/Month)</ion-label>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
|
||||
|
||||
|
||||
<!-- <ion-grid>-->
|
||||
<!-- <ion-row style="margin: 0px; padding: 0px;">-->
|
||||
<!-- <ion-col style="margin: 0px; padding: 4px;">-->
|
||||
<!-- <div style="width: 100%; background-color: #8b198e;">-->
|
||||
<!-- <div style="width: 30%; float: left;">-->
|
||||
|
||||
<!-- Year-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div style="width: 70%; float: right;">-->
|
||||
|
||||
<!-- <ion-select aria-label="Year"-->
|
||||
<!-- (ionChange)="verifyEntry()"-->
|
||||
<!-- [(ngModel)]='year'-->
|
||||
<!-- style="background-color: aliceblue; border-radius: 10px; font-size: 12px; width:100%;">-->
|
||||
<!-- <ion-select-option *ngFor="let item1 of regYear" value="{{item1}}">{{item1}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
|
||||
<!-- <ion-row style="margin: 0px; padding: 0px;">-->
|
||||
<!-- <ion-col style="margin: 0px; padding: 4px; ">-->
|
||||
<!-- <div style="width: 100%; background-color: #8b198e;">-->
|
||||
<!-- <div style="width: 30%; float: left;">-->
|
||||
<!-- Month-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div style="width: 70%; float: right;">-->
|
||||
<!-- <ion-select aria-label="Month"-->
|
||||
<!-- (ionChange)="verifyEntry()"-->
|
||||
<!-- [(ngModel)]='month'-->
|
||||
<!-- expand="block"-->
|
||||
<!-- style="background-color: aliceblue; border-radius: 10px; width: 100%; font-size: 12px;">-->
|
||||
<!-- <ion-select-option *ngFor="let item of regMonth;" value="{{item[0]}}">{{item[1]}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
|
||||
|
||||
<!-- </ion-grid>-->
|
||||
|
||||
|
||||
<!-- </ion-item>-->
|
||||
<!-- <ion-grid>-->
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col style="text-align: left">-->
|
||||
<!-- <ion-button (click)="setCloseModal()" size="small" shape="round" color="danger">-->
|
||||
<!-- Close-->
|
||||
<!-- </ion-button>-->
|
||||
|
||||
<!-- </ion-col>-->
|
||||
<!-- <ion-col>-->
|
||||
<!-- <div style="text-align: right;">-->
|
||||
<!-- {{addFamilyResult}}-->
|
||||
<!-- <ion-button shape="round"-->
|
||||
<!-- [disabled]="isDisabled"-->
|
||||
<!-- size="small"-->
|
||||
<!-- (click)="inviteFamily()">Send Invite</ion-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
<!-- </ion-grid>-->
|
||||
|
||||
</div>
|
||||
</ion-list>
|
||||
<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>-->
|
||||
</ion-col>
|
||||
<ion-col></ion-col>
|
||||
<ion-col>
|
||||
<ion-button
|
||||
shape="round"
|
||||
size="small"
|
||||
[disabled]="isDisabled"
|
||||
(click)="processCreateJob()">Create Job</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,10 +120,10 @@
|
||||
</ion-col>
|
||||
<ion-col></ion-col>
|
||||
<ion-col>
|
||||
<ion-button
|
||||
shape="round"
|
||||
size="small"
|
||||
(click)="processCreateJob()">Create Job</ion-button>
|
||||
<!-- <ion-button-->
|
||||
<!-- shape="round"-->
|
||||
<!-- size="small"-->
|
||||
<!-- (click)="processCreateJob()">Create Job</ion-button>-->
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user