page format
This commit is contained in:
@@ -46,17 +46,24 @@
|
||||
<div style="max-width:2px; background-color: white; "></div>
|
||||
<ion-select style="max-width: 100px;
|
||||
background-color: #f5f8f5;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
" aria-label="Favorite Fruit" value="Naira">
|
||||
<ion-select-option value="apple">NGN</ion-select-option>
|
||||
<ion-select-option value="banana">USD</ion-select-option>
|
||||
border-radius: 0px 10px 10px 0px;"
|
||||
[(ngModel)]='country'
|
||||
(ionChange)="testInputs()"
|
||||
aria-label="Favorite Fruit" value="Naira">
|
||||
<ion-select-option value="NG">NGN</ion-select-option>
|
||||
<ion-select-option value="US">USD</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="t_label">Timeline</div>
|
||||
<div class="t_item">
|
||||
<ion-select aria-label="Time Line" value="0" style="background-color: #dff8df; border-radius: 10px 10px 10px 10px;">
|
||||
<ion-select
|
||||
[(ngModel)]='timeline_days'
|
||||
(ionChange)="testInputs()"
|
||||
aria-label="Time Line" value="0"
|
||||
style="background-color: #dff8df;
|
||||
border-radius: 10px 10px 10px 10px;">
|
||||
<ion-select-option *ngFor="let item of timelineOptions" value="{{item.val}}">{{item.tx}}</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
@@ -71,7 +78,13 @@
|
||||
|
||||
<div class="t_label">Delivery Details</div>
|
||||
<div class="t_item">
|
||||
<ion-textarea style="height: 120px; background-color: #dff8df;" label="Fixed label" labelPlacement="fixed" placeholder="Enter text"></ion-textarea>
|
||||
<ion-textarea
|
||||
style="height: 120px; background-color: #dff8df;"
|
||||
[(ngModel)]='job_detail'
|
||||
(ionChange)="testInputs()"
|
||||
label="Delivery Details"
|
||||
labelPlacement="fixed"
|
||||
placeholder="Enter text"></ion-textarea>
|
||||
|
||||
<!-- <ion-list>-->
|
||||
<!-- -->
|
||||
@@ -106,8 +119,8 @@
|
||||
<ion-button
|
||||
shape="round"
|
||||
size="small"
|
||||
[disabled]="isProcessDisabled"
|
||||
(click)="processPayment(processor)">Assign Task </ion-button>
|
||||
[disabled]="isDisabled"
|
||||
(click)="processTask()">Assign Task </ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -12,11 +12,14 @@ import {FamilysuggestPendingService} from "../../store/familysuggest-pending.ser
|
||||
})
|
||||
export class PendingSuggestedComponent implements OnInit {
|
||||
familyPendingData: [];
|
||||
isDisabled:boolean= true;
|
||||
|
||||
constructor( private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
public familysuggestPendingService: FamilysuggestPendingService) {
|
||||
public familysuggestPendingService: FamilysuggestPendingService,
|
||||
private loadingCtrl: LoadingController) {
|
||||
|
||||
addEventListener('app-pending-suggested-closemodal', () => {
|
||||
this.setCloseModal();
|
||||
@@ -89,4 +92,87 @@ selectedItem:any;
|
||||
this.isModalOpenBackdrop= false;
|
||||
},1000);
|
||||
}
|
||||
|
||||
reqData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
family_uid: string,
|
||||
category : string,
|
||||
banner: string,
|
||||
title: string,
|
||||
timeline_days: number,
|
||||
job_description: string,
|
||||
job_detail:string,
|
||||
country: string,
|
||||
assign_mode: number
|
||||
};
|
||||
|
||||
@ViewChild('timeline_days') timeline_days;
|
||||
@ViewChild('title') title;
|
||||
@ViewChild('job_description') job_description;
|
||||
@ViewChild('job_detail') job_detail;
|
||||
@ViewChild('country') country;
|
||||
assigResult:any;
|
||||
assign_ind_result:string='';
|
||||
assign_mak_result:string='';
|
||||
|
||||
async sendOfferToFamily(){
|
||||
if ( this.timeline_days== undefined || this.timeline_days < 1){
|
||||
alert("Select Duration");
|
||||
return;
|
||||
}
|
||||
this.reqData = {
|
||||
action:13025,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
family_uid: this.selectedItem.family_uid,
|
||||
category:'',
|
||||
banner: '',
|
||||
title: this.selectedItem.title,
|
||||
timeline_days: this.timeline_days,
|
||||
job_description: this.selectedItem.description,
|
||||
job_detail: this.timeline_days,
|
||||
country: this.country,
|
||||
assign_mode: 110055
|
||||
};
|
||||
// console.log('XXX-> ', this.reqData );
|
||||
// debugger;
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 5000,
|
||||
});
|
||||
|
||||
loading.present();
|
||||
|
||||
this.wrenchService.assignTask(this.reqData).subscribe(
|
||||
assigResult => {
|
||||
this.assigResult = assigResult;
|
||||
console.log("assigResult RETURN->", this.assigResult);
|
||||
if ( this.assigResult != undefined && this.assigResult.internal_return > 0){
|
||||
this.assign_mak_result = "Task sent to market";
|
||||
const event = new Event("app-myjob-offers-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
setTimeout(() => {
|
||||
this.assign_mak_result ='';
|
||||
}, 3000);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
testInputs(){
|
||||
//isDisabled
|
||||
}
|
||||
processTask(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item class="arcord_head" slot="header" color="secondary">
|
||||
<ion-label>Prefered List</ion-label>
|
||||
<ion-label>Preferred List</ion-label>
|
||||
</ion-item>
|
||||
<div class="ion-padding" slot="content">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user