current offers
This commit is contained in:
@@ -60,6 +60,11 @@ ionic generate service user-wallet
|
||||
ionic generate service waiting-interest
|
||||
|
||||
ionic generate component tracking
|
||||
ionic generate component myjob-offers
|
||||
|
||||
|
||||
pendingoffers
|
||||
|
||||
|
||||
ionic generate page addcredit
|
||||
ionic generate page ownersjob
|
||||
@@ -69,6 +74,7 @@ ionic generate component latest-market
|
||||
ionic generate service tasks-data
|
||||
ionic generate service banners-data
|
||||
|
||||
***ionic generate service pendingjob-data
|
||||
|
||||
|
||||
https://masteringionic.com/blog/working-with-capacitor-googlemaps-in-ionic
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<div style="background-color: white">
|
||||
<div class="lesson">
|
||||
<div class="video" *ngFor="let item of jobManagerOffersData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url('+session_image_server+'/'+curr_session+'/job/'+item.job_uid+')'"></div>
|
||||
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">{{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.description}}</ion-label>
|
||||
<ion-label class="price_line">{{item.offer_code}} {{item.price*0.01}} {{item.currency}} </ion-label>
|
||||
<ion-label class="due_date">Expire: {{item.expire |date}}</ion-label>
|
||||
<ion-label class="grey_text">Send to : {{item.job_to}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
|
||||
.lesson {
|
||||
margin-top: 20px;
|
||||
|
||||
.bold {
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.color {
|
||||
color: var(--ion-color-primary);
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.sec {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.video {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: white;
|
||||
padding: 15px;
|
||||
box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 10px;
|
||||
margin-top: 20px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.men_image {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
border-radius: 100%;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.bold_text {
|
||||
font-size: 16px;
|
||||
font-family: 'bold';
|
||||
}
|
||||
|
||||
.grey_text {
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { MyjobOffersComponent } from './myjob-offers.component';
|
||||
|
||||
describe('MyjobOffersComponent', () => {
|
||||
let component: MyjobOffersComponent;
|
||||
let fixture: ComponentFixture<MyjobOffersComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MyjobOffersComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(MyjobOffersComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,64 @@
|
||||
import { Router } from '@angular/router';
|
||||
import {Component, OnInit, Input } from '@angular/core';
|
||||
import { NavController } from '@ionic/angular';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-myjob-offers',
|
||||
templateUrl: './myjob-offers.component.html',
|
||||
styleUrls: ['./myjob-offers.component.scss'],
|
||||
})
|
||||
export class MyjobOffersComponent implements OnInit {
|
||||
@Input('jobData') jobData:any;
|
||||
|
||||
|
||||
tabs = 'about';
|
||||
session_image_server:string='';
|
||||
curr_session:string="";
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
|
||||
this.getPendingOffersData();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log('AMEYE===>', this.jobData);
|
||||
}
|
||||
usrData: {
|
||||
action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0
|
||||
};
|
||||
|
||||
jobManagerOffersTotalData:any;
|
||||
jobManagerOffersData: [];
|
||||
async getPendingOffersData(){
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.usrData = {action:11309,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:20, page:1,offset: 0}
|
||||
|
||||
this.wrenchService.jobmanageroffers(this.usrData).subscribe(
|
||||
jobManagerOffersTotalData => {
|
||||
this.jobManagerOffersTotalData = jobManagerOffersTotalData;
|
||||
console.log("jobManagerOffersTotalData RETURN->", this.jobManagerOffersTotalData);
|
||||
if (this.jobData !=undefined && this.jobData.job_uid !=''){
|
||||
this.jobManagerOffersData = this.jobManagerOffersTotalData.result_list.filter((item)=>item.job_uid==this.jobData.job_uid);
|
||||
}
|
||||
else{
|
||||
this.jobManagerOffersData = this.jobManagerOffersTotalData.result_list;
|
||||
}
|
||||
this.session_image_server = this.jobManagerOffersTotalData.session_image_server;
|
||||
|
||||
// debugger;
|
||||
console.log("jobManagerOffersData RETURN DATA->", this.jobManagerOffersTotalData);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { OwnersjobPageRoutingModule } from './ownersjob-routing.module';
|
||||
|
||||
import { OwnersjobPage } from './ownersjob.page';
|
||||
import {MyjobOffersComponent} from "../../components/myjob-offers/myjob-offers.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -15,6 +16,6 @@ import { OwnersjobPage } from './ownersjob.page';
|
||||
IonicModule,
|
||||
OwnersjobPageRoutingModule
|
||||
],
|
||||
declarations: [OwnersjobPage]
|
||||
declarations: [OwnersjobPage,MyjobOffersComponent]
|
||||
})
|
||||
export class OwnersjobPageModule {}
|
||||
|
||||
@@ -129,6 +129,10 @@
|
||||
</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
|
||||
<div class="curr_ass">Current Assignments</div>
|
||||
<app-myjob-offers [jobData]="jobData"></app-myjob-offers>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ ion-content {
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
margin-top: 30px;
|
||||
|
||||
.bg_text {
|
||||
color: var(--ion-color-primary);
|
||||
@@ -106,6 +106,11 @@ ion-content {
|
||||
font-weight: bold;
|
||||
color: #2dd36f;
|
||||
}
|
||||
.curr_ass{
|
||||
font-weight: bolder;
|
||||
font-size: 16px;
|
||||
padding-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.about {
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user