diff --git a/src/app/components/offers-received/offers-received.component.html b/src/app/components/offers-received/offers-received.component.html
new file mode 100644
index 0000000..7af09d0
--- /dev/null
+++ b/src/app/components/offers-received/offers-received.component.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
3;">
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
+
+
+
{{item.title}}
+
Expiration : {{item.expire | date}}
+
Price : {{item.price*0.01| number : '1.2-2'}} {{item.currency}}
+
+
+
+ {{(item.job_description.length<95)? item.job_description :item.job_description.substring(0,95)+'...' }}
+
+
+
+
+
+
+
+
+
+
+ Reject
+
+
+
+
+
+ Start Now
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
0 && total_offers<4;">
+
+
+
+
+
+
+
+
+
+
+
{{item.title}}
+
Expiration : {{item.expire | date}}
+
Price : {{item.price*0.01| number : '1.2-2'}} {{item.currency}}
+
+
+
+ {{(item.job_description.length<95)? item.job_description :item.job_description.substring(0,95)+'...' }}
+
+
+
+
+
+
+
+
+
+
+ Reject
+
+
+
+
+
+ Start Now
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/components/offers-received/offers-received.component.scss b/src/app/components/offers-received/offers-received.component.scss
new file mode 100644
index 0000000..632b38b
--- /dev/null
+++ b/src/app/components/offers-received/offers-received.component.scss
@@ -0,0 +1,467 @@
+
+ion-content {
+ .offers_div{
+ background-color: aliceblue;
+ border-radius: 10px;
+ border-color: #383a3e;
+ margin: 10px 0 10px 0;
+ .offer_title{
+ font-size: 18px;
+ font-weight: bolder;
+ }
+ .action_area{
+ background-color:whitesmoke;
+ }
+ .offer_banner{
+ border-radius: 100%;
+ background-color: white;
+ width: 100%;
+ height: auto;
+ }
+ .price{
+ margin-top: 5px;
+ margin-bottom: 5px;
+ color:green;
+ font-size: 14px;
+ }
+ .expire{
+ font-weight: bold;
+ color: red;
+ font-size: 10px;
+ }
+ .detail_txt{
+ font-size: 14px;
+ margin: 5px;
+ font-weight: bold;
+ background-color: white;
+ border-radius: 10px;
+ min-height: 120px;
+ padding: 3px;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ }
+ }
+ .hdt{
+ padding-bottom: 10px;
+ }
+ .back_image {
+ width: 100%;
+ height: 100px;
+
+ .back {
+ font-size: 25px;
+ color: white;
+ }
+ }
+
+ .flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ ion-icon {
+ font-size: 22px;
+ }
+ }
+
+ .row {
+ display: flex;
+ align-items: center;
+ margin-top: 10px;
+
+ .bg_text {
+ color: var(--ion-color-primary);
+ background: #dfe1f3;
+ font-size: 12px;
+ padding: 2px 5px;
+ border-radius: 5px;
+ margin-right: 10px;
+ }
+
+ .rate {
+ display: flex;
+ align-items: center;
+
+ .review {
+ margin-left: 5px;
+ }
+ }
+ }
+
+ .color_text {
+ margin-top: 10px;
+ font-size: 22px;
+ font-family: 'semi-bold';
+ color: var(--ion-color-primary);
+ }
+
+ .items {
+ display: flex;
+ justify-content: space-between;
+ margin-top: 10px;
+ margin-bottom: 20px;
+ border-bottom: 1px solid lightgrey;
+ padding-bottom: 10px;
+
+ .stud {
+ display: flex;
+ align-items: center;
+
+ ion-icon {
+ margin-right: 5px;
+ }
+
+ ion-label {
+ color: grey;
+ }
+ }
+ }
+
+ .about {
+ margin-top: 10px;
+
+ .head_text {
+ font-size: 18px;
+ font-family: 'semi-bold';
+ margin-bottom: 10px;
+ }
+
+ .mentor {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 20px;
+
+ .left {
+ display: flex;
+
+ .men_image {
+ height: 50px;
+ width: 50px;
+ border-radius: 100%;
+ }
+
+ .bold {
+ font-family: 'semi-bold';
+ }
+
+ .grey {
+ color: grey;
+ font-size: 14px;
+ }
+ }
+
+ ion-icon {
+ font-size: 25px;
+ }
+ }
+
+ .description {
+ color: grey;
+ margin-bottom: 5px;
+ }
+ }
+
+ .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: 40px;
+ width: 40px;
+ border-radius: 100%;
+ }
+
+ .text {
+ margin-left: 10px;
+ }
+
+ .bold_text {
+ font-size: 16px;
+ font-family: 'bold';
+ }
+
+ .grey_text {
+ font-size: 14px;
+ color: grey;
+ }
+ }
+ }
+
+ .review_tab {
+ margin-top: 20px;
+
+ .total {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .star-rate {
+ display: flex;
+ align-items: center;
+
+ .bold {
+ font-size: 17px;
+ font-family: 'semi-bold';
+ margin-left: 5px;
+ }
+ }
+
+ .color {
+ color: var(--ion-color-primary);
+ font-size: 14px;
+ }
+ }
+
+
+ .story-item {
+ overflow: scroll;
+ display: flex;
+ flex-direction: row;
+ margin-top: 20px;
+
+ .menu {
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+
+ .item {
+ padding: 5px;
+ margin: 5px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ text-align: center;
+
+ ion-thumbnail {
+ border-radius: 15px;
+ width: max-content;
+ height: 60px;
+ width: 60px;
+ --border-radius: 50%;
+ }
+
+ ion-label {
+ font-size: 14px;
+ font-family: "medium";
+ color: var(--ion-color-medium);
+ }
+ }
+
+ .text {
+
+ display: flex;
+ align-items: center;
+ text-align: center;
+
+ .select {
+ display: flex;
+ align-items: center;
+ border: 1px solid var(--ion-color-primary);
+ border-radius: 20px;
+ padding: 2px 15px;
+ margin-right: 10px;
+
+ .rate_num {
+ margin-left: 5px;
+ color: var(--ion-color-primary);
+ }
+ }
+
+ .show {
+ background-color: var(--ion-color-primary);
+ }
+
+ .white {
+ color: white !important;
+ }
+
+ .choice {
+ display: flex;
+ }
+ }
+ }
+ }
+
+ .reviw_list {
+ margin-top: 25px;
+
+ .profile {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 10px;
+
+ .left {
+ display: flex;
+ align-items: center;
+
+ .men_image {
+ height: 40px;
+ width: 40px;
+ border-radius: 100%;
+ }
+
+
+ .bold {
+ font-family: 'semi-bold';
+ }
+
+ .grey {
+ color: grey;
+ font-size: 14px;
+ }
+ }
+
+ .right {
+ display: flex;
+ align-items: center;
+
+ .select {
+ display: flex;
+ align-items: center;
+ border: 1px solid var(--ion-color-primary);
+ border-radius: 20px;
+ padding: 2px 15px;
+ margin-right: 10px;
+
+ .rate_num {
+ margin-left: 5px;
+ color: var(--ion-color-primary);
+ }
+ }
+
+ ion-icon {
+ font-size: 20px;
+ }
+ }
+ }
+
+ .like {
+ display: flex;
+ align-items: center;
+ margin-top: 10px;
+
+ .heart {
+ font-size: 25px;
+ margin-right: 5px;
+ }
+
+ .count {
+ margin-right: 10px;
+ }
+
+ .time {
+ color: grey;
+ font-size: 14px;
+ }
+ }
+ }
+ }
+
+
+
+ .bold_text {
+ font-size: 20px;
+ font-family: 'bold';
+ }
+}
+
+ion-card{
+ border-color: #3dc2ff;
+ background-color: aliceblue;
+ margin-left: 0px;
+ margin-right: 0px;
+ ion-card-content{
+ font-size: 14px;
+ }
+ ion-card-subtitle{
+ color: red;
+ }
+ .top_banner{
+ background-color: white;
+ width: 100%;
+ //background-color: #2dd36f;
+ margin-left: auto;
+ margin-right: auto;
+ text-align: center;
+ .offer_banner{
+ width: auto;
+ height: 100px;
+ background-size: contain;
+ background-repeat: no-repeat;
+
+ }
+ }
+
+ .offer_title{
+ font-size: 18px;
+ }
+ ion-grid{
+ background-color: white;
+ ion-col{
+ text-align: center;
+ }
+ }
+
+}
+
+ion-footer {
+ --background: white;
+
+ ion-toolbar {
+ --border-width: 0px;
+ padding: 10px;
+ align-items: center;
+
+ ion-icon {
+ color: white;
+ font-size: 25px;
+ }
+
+ .button {
+ background-color: var(--ion-color-primary);
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ border-radius: 30px;
+ padding: 12px 0;
+
+ .text {
+ color: white;
+ }
+ }
+ }
+}
diff --git a/src/app/components/offers-received/offers-received.component.spec.ts b/src/app/components/offers-received/offers-received.component.spec.ts
new file mode 100644
index 0000000..30cbb04
--- /dev/null
+++ b/src/app/components/offers-received/offers-received.component.spec.ts
@@ -0,0 +1,24 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { OffersReceivedComponent } from './offers-received.component';
+
+describe('OffersReceivedComponent', () => {
+ let component: OffersReceivedComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(waitForAsync(() => {
+ TestBed.configureTestingModule({
+ declarations: [ OffersReceivedComponent ],
+ imports: [IonicModule.forRoot()]
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(OffersReceivedComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ }));
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/offers-received/offers-received.component.ts b/src/app/components/offers-received/offers-received.component.ts
new file mode 100644
index 0000000..ad1d0a3
--- /dev/null
+++ b/src/app/components/offers-received/offers-received.component.ts
@@ -0,0 +1,145 @@
+import { Component, OnInit } from '@angular/core';
+import {AlertController, LoadingController, NavController} from "@ionic/angular";
+import {Router} from "@angular/router";
+import {SessionDataProviderService} from "../../store/session-data-provider.service";
+import {WrenchService} from "../../services/wrench.service";
+
+@Component({
+ selector: 'app-offers-received',
+ templateUrl: './offers-received.component.html',
+ styleUrls: ['./offers-received.component.scss'],
+})
+export class OffersReceivedComponent implements OnInit {
+
+ constructor(
+ private navctrl: NavController,
+ private router: Router,
+ public sessionDataProviderService: SessionDataProviderService,
+ private alertController:AlertController,
+ private wrenchService: WrenchService,
+ private loadingCtrl: LoadingController
+ ) { }
+
+ ngOnInit() {
+ this.getMyOffersData();
+ }
+
+ session_image_server:string='';
+ curr_session:string='';
+ //
+ usrData: {
+ action:number, member_id: number, uid: string,
+ sessionid: string,
+ limit:20,
+ page:1, offset:number
+ };
+ total_offers:number = 0;
+ myOffersTotalData:any;
+ myOffersData: [];
+ async getMyOffersData(){
+ this.usrData = {action:15010,
+ member_id: this.sessionDataProviderService.member_id,
+ uid: this.sessionDataProviderService.member_uid,
+ sessionid: this.sessionDataProviderService.session ,
+ limit:20, page:1,offset: 0}
+
+ this.curr_session = this.sessionDataProviderService.session;
+ this.wrenchService.getMyOffers(this.usrData).subscribe(
+ myOffersTotalData => {
+ this.myOffersTotalData = myOffersTotalData;
+ this.session_image_server = this.myOffersTotalData.session_image_server;
+ console.log("myOffersTotalData RETURN->", this.myOffersTotalData);
+ this.myOffersData = this.myOffersTotalData.result_list;
+ console.log("myOffersData RETURN DATA->", this.myOffersData);
+ this.total_offers = this.myOffersData?.length;
+ }
+ );
+
+ }
+
+
+ async requestStart(item) {
+ const alert = await this.alertController.create({
+ header: "Ready to start",
+ message: "You will start the task now, offer shall be completed in allocated timeline.",
+ buttons: [
+ {
+ text: "Cancel",
+ role: "cancel",
+ handler: () => {
+ this.getMyOffersData();
+ },
+ },
+ {
+ text: "Start Now",
+ handler: () => {
+ this.sendOfferResponse(item, 100);
+ this.getMyOffersData();
+ },
+ },
+ ],
+ });
+ await alert.present();
+ }
+
+ async requestReject(item) {
+ const alert = await this.alertController.create({
+ header: "Confirm Reject",
+ message: "This task will go away, you dont have to do anything.",
+ buttons: [
+ {
+ text: "Cancel",
+ role: "cancel",
+ handler: () => {
+ this.getMyOffersData();
+ },
+ },
+ {
+ text: "Reject",
+ handler: () => {
+ this.sendOfferResponse(item, 333);
+ this.getMyOffersData();
+ },
+ },
+ ],
+ });
+ await alert.present();
+ }
+
+ responseData: {
+ action:number,
+ member_id: number,
+ uid: string,
+ sessionid: string,
+ offer_result:number,
+ contract:string,
+ offer_code:string
+ };
+
+ offerRespData:any;
+ // offferResponse(respData)
+ async sendOfferResponse(item, respType){
+ const loading = await this.loadingCtrl.create({
+ message: 'Processing',
+ duration: 3000,
+ });
+ this.responseData = {
+ action:15010,
+ member_id: this.sessionDataProviderService.member_id,
+ uid: this.sessionDataProviderService.member_uid,
+ sessionid: this.sessionDataProviderService.session ,
+ offer_result:respType,
+ contract:item.contract,
+ offer_code: item.contract
+ };
+ await loading.present();
+ this.wrenchService.offferResponse(this.responseData).subscribe(
+ offerRespData => {
+ this.offerRespData = offerRespData;
+ console.log("offerRespData RETURN->", this.offerRespData);
+ this.getMyOffersData();
+ }
+ );
+ }
+
+}
diff --git a/src/app/pages/home/home.module.ts b/src/app/pages/home/home.module.ts
index 59d4b26..2db95c8 100644
--- a/src/app/pages/home/home.module.ts
+++ b/src/app/pages/home/home.module.ts
@@ -25,7 +25,8 @@ import {WorkersDashComponent} from "../../components/workers-dash/workers-dash.c
import {FamilyhomeComponent} from "../../components/familyhome/familyhome.component";
import {FamilyConnectComponent} from "../../components/family-connect/family-connect.component";
import {GenerativeActivityComponent} from "../../components/generative-activity/generative-activity.component";
-
+import { MyjobOffersComponent } from "../../components/myjob-offers/myjob-offers.component";
+import { OffersReceivedComponent } from "../../components/offers-received/offers-received.component";
// @NgModule({
// schemas: [CUSTOM_ELEMENTS_SCHEMA]
// })
@@ -38,18 +39,25 @@ import {GenerativeActivityComponent} from "../../components/generative-activity/
HomePageRoutingModule
],
declarations: [
- HomePage,SuggestedlistComponent,FamilypendingComponent,
- TrackingComponent,FastrewardComponent,
- LatestMarketComponent,HelpListingComponent,
- FamiliyDashComponent,FamiliyNokidsComponent,
- FamiliyNotaskComponent,FamiliyAddfamilyComponent,
+ HomePage,SuggestedlistComponent,
+ FamilypendingComponent,
+ TrackingComponent,
+ FastrewardComponent,
+ LatestMarketComponent,
+ HelpListingComponent,
+ FamiliyDashComponent,
+ FamiliyNokidsComponent,
+ FamiliyNotaskComponent,
+ FamiliyAddfamilyComponent,
FamiliyAllowanceComponent,
DashToptoolComponent,
JobownerDashComponent,
WorkersDashComponent,
FamilyhomeComponent,
FamilyConnectComponent,
- GenerativeActivityComponent
+ GenerativeActivityComponent,
+ MyjobOffersComponent,
+ OffersReceivedComponent
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
diff --git a/src/app/pages/home/home.page.html b/src/app/pages/home/home.page.html
index d94bbda..9bc8f2d 100644
--- a/src/app/pages/home/home.page.html
+++ b/src/app/pages/home/home.page.html
@@ -78,6 +78,7 @@
+