job group
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
You do not have any group currently
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-button size="small" shape="round" expand="block">Create a group</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { JobGroupComponent } from './job-group.component';
|
||||
|
||||
describe('JobGroupComponent', () => {
|
||||
let component: JobGroupComponent;
|
||||
let fixture: ComponentFixture<JobGroupComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ JobGroupComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(JobGroupComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {LoadingController} from "@ionic/angular";
|
||||
|
||||
@Component({
|
||||
selector: 'app-job-group',
|
||||
templateUrl: './job-group.component.html',
|
||||
styleUrls: ['./job-group.component.scss'],
|
||||
})
|
||||
export class JobGroupComponent implements OnInit {
|
||||
|
||||
constructor( public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private loadingCtrl: LoadingController) { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
||||
@@ -179,7 +179,7 @@
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
<ion-button color="secondary" expand="block" >Request Extension</ion-button>
|
||||
<ion-button color="secondary" size="small" shape="round" expand="block" (click)="requestExtension()">Request Extension</ion-button>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
@@ -303,4 +303,52 @@ export class ActivetaskPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async requestExtension(){
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_REQEXTENT',
|
||||
}
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 2500,
|
||||
});
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Request Extensions",
|
||||
message: "Confirm you are ready to send request?",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Send Request",
|
||||
handler: () => {
|
||||
loading.present();
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res)=> {
|
||||
loading.dismiss();
|
||||
if (res.status != 200 || res.data.internal_return < 0) {
|
||||
// setReqStatus({loading:false, status: false, message: 'unable to complete request. Try again'})
|
||||
// Alert("Unable to set task as completed, try again soon");
|
||||
} else {
|
||||
// this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { OwnersjobPageRoutingModule } from './ownersjob-routing.module';
|
||||
import { OwnersjobPage } from './ownersjob.page';
|
||||
import {MyjobOffersComponent} from "../../components/myjob-offers/myjob-offers.component";
|
||||
import {JobDetailsComponent} from "../../components/job-details/job-details.component";
|
||||
import {JobGroupComponent} from "../../components/job-group/job-group.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -17,6 +18,6 @@ import {JobDetailsComponent} from "../../components/job-details/job-details.comp
|
||||
IonicModule,
|
||||
OwnersjobPageRoutingModule
|
||||
],
|
||||
declarations: [OwnersjobPage,MyjobOffersComponent,JobDetailsComponent]
|
||||
declarations: [OwnersjobPage,MyjobOffersComponent,JobDetailsComponent,JobGroupComponent]
|
||||
})
|
||||
export class OwnersjobPageModule {}
|
||||
|
||||
@@ -134,9 +134,7 @@
|
||||
<ion-label>Preferred List</ion-label>
|
||||
</ion-item>
|
||||
<div class="ion-padding" slot="content">
|
||||
|
||||
<div> Comming Soon </div>
|
||||
|
||||
<app-job-group></app-job-group>
|
||||
</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
|
||||
Reference in New Issue
Block a user