diff --git a/.gitignore-DEL b/.gitignore-DEL new file mode 100644 index 0000000..40df125 --- /dev/null +++ b/.gitignore-DEL @@ -0,0 +1,14 @@ +node_modules +.angular +.angular/* +*angular/* +.idea +.angular/cache/* +ios +andriod +www +www/* +.angular/cache +.angular/cache/14.2.0/* +# src\environments\* +# src/environments/* diff --git a/REMEMBER.txt b/REMEMBER.txt index b13dbc6..c1c1a3f 100644 --- a/REMEMBER.txt +++ b/REMEMBER.txt @@ -27,7 +27,7 @@ ionic generate component fastreward ionic generate component familypending ionic generate component InterestCard - +ionic generate component PendingSuggested ionic generate page logout @@ -62,6 +62,9 @@ ionic generate service waiting-interest ionic generate component tracking ionic generate component myjob-offers +ionic generate component add-jobs +ionic generate component add-family + pendingoffers @@ -98,6 +101,8 @@ ionic generate service loc-trc ionic generate service recipients +ionic generate service familysuggest-pending + npm i @capacitor/camera @capacitor/filesystem diff --git a/src/app/accounts/addcredit/addcredit.page.ts b/src/app/accounts/addcredit/addcredit.page.ts index 85d70e5..65f25a7 100644 --- a/src/app/accounts/addcredit/addcredit.page.ts +++ b/src/app/accounts/addcredit/addcredit.page.ts @@ -172,23 +172,17 @@ export class AddcreditPage implements OnInit { this.wrenchService.topupResultFLTW(completeCredit).subscribe( competeCreditResult => { console.log("startCreditResult TOTAL RETURN->", this.startCreditResult); + const event = new Event("app-wallet-refresh"); + dispatchEvent(event); // debugger; if ( competeCreditResult!=undefined && competeCreditResult.tx_ref!='' && competeCreditResult.confirmation!='' ){ this.credit_confirmation = competeCreditResult.confirmation; - // this.startCreditResult = startCreditResult; - // this.flutterwave_key = this.startCreditResult.flutterwave_key; - - // this.isModalOpen = true; - // this.isModalOpenBackdrop= true; - const event = new Event("app-wallet-refresh"); - dispatchEvent(event); } } ); // ------------------------------------------------------ } } - this.flutterwave.closePaymentModal(5) } ) diff --git a/src/app/components/pending-suggested/pending-suggested.component.html b/src/app/components/pending-suggested/pending-suggested.component.html new file mode 100644 index 0000000..90ec0d3 --- /dev/null +++ b/src/app/components/pending-suggested/pending-suggested.component.html @@ -0,0 +1,102 @@ +
+
+
+ +
+ {{item.firstname}} + {{item.title}} + {{item.description}} + Added: {{item.added}} + Status: {{item.status_text}} +
+
+
+ +
+
+ +
+ + + + + {{modalTile}} + + Close + + + + +
+
Title
+
{{selectedItem.title}}
+ +
Description
+
{{selectedItem.description}}
+ + + + +
Reward
+
real_data_hrere
+
+ +
Timeline
+
_data_hrere
+
+
+
+ + + + + + +
Delivery Details
+
+ + + + + + + + + + + +
+ +
+ + + +
+ + + + + + Close + + + + + Assign Task + + + + + + +
+
+
\ No newline at end of file diff --git a/src/app/components/pending-suggested/pending-suggested.component.scss b/src/app/components/pending-suggested/pending-suggested.component.scss new file mode 100644 index 0000000..e021f0a --- /dev/null +++ b/src/app/components/pending-suggested/pending-suggested.component.scss @@ -0,0 +1,17 @@ +.men_image{ + min-width: 35px; +} +.t_label{ + font-weight: bolder; + width: 100%; + text-align: left; +} +.t_item{ + width: 100%; + text-align: left; + margin: 2px 0px 2px 5px; + padding: 2px; + background-color: whitesmoke; + font-size: 14px; + border-radius: 10px; +} \ No newline at end of file diff --git a/src/app/components/pending-suggested/pending-suggested.component.spec.ts b/src/app/components/pending-suggested/pending-suggested.component.spec.ts new file mode 100644 index 0000000..1316648 --- /dev/null +++ b/src/app/components/pending-suggested/pending-suggested.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { PendingSuggestedComponent } from './pending-suggested.component'; + +describe('PendingSuggestedComponent', () => { + let component: PendingSuggestedComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PendingSuggestedComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(PendingSuggestedComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/pending-suggested/pending-suggested.component.ts b/src/app/components/pending-suggested/pending-suggested.component.ts new file mode 100644 index 0000000..b87636d --- /dev/null +++ b/src/app/components/pending-suggested/pending-suggested.component.ts @@ -0,0 +1,78 @@ +import { Component, OnInit } from '@angular/core'; +import {NavController} from "@ionic/angular"; +import {Router} from "@angular/router"; +import {SessionDataProviderService} from "../../store/session-data-provider.service"; +import {WrenchService} from "../../services/wrench.service"; +import {FamilysuggestPendingService} from "../../store/familysuggest-pending.service"; + +@Component({ + selector: 'app-pending-suggested', + templateUrl: './pending-suggested.component.html', + styleUrls: ['./pending-suggested.component.scss'], +}) +export class PendingSuggestedComponent implements OnInit { + familyPendingData: []; + constructor( private navctr: NavController, + private router: Router, + public sessionDataProviderService: SessionDataProviderService, + private wrenchService: WrenchService, + public familysuggestPendingService: FamilysuggestPendingService) { + + addEventListener('app-pending-suggested-closemodal', () => { + this.setCloseModal(); + }); + + } + + ngOnInit() { + //this.getFamilyPeningData(); + this.familyPendingData = this.familysuggestPendingService.familyPendingData; + + } + suggestion_total:number=0; + usrData: { + action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0 + }; + + //familyPendingTotalData:any; + // familyPendingData: []; + // getFamilyPeningData(){ + // this.usrData = {action:22010, + // member_id: this.sessionDataProviderService.member_id, + // uid: this.sessionDataProviderService.member_uid, + // sessionid: this.sessionDataProviderService.session , + // limit:20, page:1,offset: 0} + // + // this.wrenchService.getFamilyPeningList(this.usrData).subscribe( + // familyPendingTotalData => { + // this.familyPendingTotalData = familyPendingTotalData; + // console.log("familyPendingTotalData RETURN->", this.familyPendingTotalData); + // this.familyPendingData = this.familyPendingTotalData.result_list; + // // debugger; + // console.log("FAMILY familyPendingData DATA->", this.familyPendingData); + // this.suggestion_total = this.familyPendingData.length; + // } + // ); + // + // } + isModalOpen:boolean = false; + isModalOpenBackdrop:boolean = false; +selectedItem:any; + modalTile:string=''; + processFamilyPending(item){ + console.log("SUGGESTED ITEM - >", item); +this.selectedItem = item; + + this.modalTile = item.firstname+ ' Suggested Task'; + + this.isModalOpen = true; + this.isModalOpenBackdrop= true; + } + + setCloseModal(){ + this.isModalOpen = false; + setTimeout(()=>{ + this.isModalOpenBackdrop= false; + },1000); + } +} diff --git a/src/app/pages/family/family.module.ts b/src/app/pages/family/family.module.ts index 6516ddb..159f8d0 100644 --- a/src/app/pages/family/family.module.ts +++ b/src/app/pages/family/family.module.ts @@ -7,6 +7,7 @@ import { IonicModule } from '@ionic/angular'; import { FamilyPageRoutingModule } from './family-routing.module'; import { FamilyPage } from './family.page'; +import {PendingSuggestedComponent} from "../../components/pending-suggested/pending-suggested.component"; @NgModule({ imports: [ @@ -15,6 +16,6 @@ import { FamilyPage } from './family.page'; IonicModule, FamilyPageRoutingModule ], - declarations: [FamilyPage] + declarations: [FamilyPage,PendingSuggestedComponent] }) export class FamilyPageModule {} diff --git a/src/app/pages/family/family.page.html b/src/app/pages/family/family.page.html index a77e287..481dfec 100644 --- a/src/app/pages/family/family.page.html +++ b/src/app/pages/family/family.page.html @@ -125,22 +125,24 @@ -
-
-
+ -
- {{item.firstname}} - {{item.title}} - {{item.description}} - Added: {{item.added}} - Status: {{item.status_text}} -
-
-
- -
-
+ + + + + + + + + + + + + + + + diff --git a/src/app/pages/family/family.page.ts b/src/app/pages/family/family.page.ts index 3e1185a..b8354a3 100644 --- a/src/app/pages/family/family.page.ts +++ b/src/app/pages/family/family.page.ts @@ -3,6 +3,7 @@ import {NavController} from "@ionic/angular"; import {Router} from "@angular/router"; import { WrenchService } from 'src/app/services/wrench.service'; import {SessionDataProviderService} from "../../store/session-data-provider.service"; +import {FamilysuggestPendingService} from "../../store/familysuggest-pending.service"; @Component({ @@ -24,20 +25,25 @@ export class FamilyPage implements OnInit { private navctr: NavController, private router: Router, public sessionDataProviderService: SessionDataProviderService, - private wrenchService: WrenchService + private wrenchService: WrenchService, + public familysuggestPendingService: FamilysuggestPendingService ) { } member_uid:string=''; ngOnInit() { + this.familysuggestPendingService.getFamilyPeningData(); // refresh data in store this.member_uid= this.sessionDataProviderService.member_uid this.getFamilyData(); + this.familyPendingData = this.familysuggestPendingService.familyPendingData; + this.suggestion_total = this.familysuggestPendingService.suggestionTotal; this.getFamilyPeningData(); this.getFamilyActiveJobsData(); } onBack() { + dispatchEvent(new Event("app-pending-suggested-closemodal")); this.navctr.back(); } @@ -91,22 +97,28 @@ export class FamilyPage implements OnInit { familyPendingTotalData:any; familyPendingData: []; getFamilyPeningData(){ - this.usrData = {action:22010, - member_id: this.sessionDataProviderService.member_id, - uid: this.sessionDataProviderService.member_uid, - sessionid: this.sessionDataProviderService.session , - limit:20, page:1,offset: 0} - this.wrenchService.getFamilyPeningList(this.usrData).subscribe( - familyPendingTotalData => { - this.familyPendingTotalData = familyPendingTotalData; - console.log("familyPendingTotalData RETURN->", this.familyPendingTotalData); - this.familyPendingData = this.familyPendingTotalData.result_list; - // debugger; - console.log("FAMILY familyPendingData DATA->", this.familyPendingData); - this.suggestion_total = this.familyPendingData.length; - } - ); + setTimeout(()=>{ + this.familyPendingData = this.familysuggestPendingService.familyPendingData; + this.suggestion_total = this.familysuggestPendingService.suggestionTotal; + }, 5000); + + // this.usrData = {action:22010, + // member_id: this.sessionDataProviderService.member_id, + // uid: this.sessionDataProviderService.member_uid, + // sessionid: this.sessionDataProviderService.session , + // limit:20, page:1,offset: 0} + // + // this.wrenchService.getFamilyPeningList(this.usrData).subscribe( + // familyPendingTotalData => { + // this.familyPendingTotalData = familyPendingTotalData; + // console.log("familyPendingTotalData RETURN->", this.familyPendingTotalData); + // this.familyPendingData = this.familyPendingTotalData.result_list; + // // debugger; + // console.log("FAMILY familyPendingData DATA->", this.familyPendingData); + // this.suggestion_total = this.familyPendingData.length; + // } + // ); } diff --git a/src/app/pages/joblist/joblist.page.ts b/src/app/pages/joblist/joblist.page.ts index b83cf9b..926121f 100644 --- a/src/app/pages/joblist/joblist.page.ts +++ b/src/app/pages/joblist/joblist.page.ts @@ -31,6 +31,7 @@ export class JoblistPage implements OnInit { } onBack() { + this. setCloseModal(); this.navctr.back(); } diff --git a/src/app/store/familysuggest-pending.service.spec.ts b/src/app/store/familysuggest-pending.service.spec.ts new file mode 100644 index 0000000..9576bb1 --- /dev/null +++ b/src/app/store/familysuggest-pending.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { FamilysuggestPendingService } from './familysuggest-pending.service'; + +describe('FamilysuggestPendingService', () => { + let service: FamilysuggestPendingService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(FamilysuggestPendingService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/store/familysuggest-pending.service.ts b/src/app/store/familysuggest-pending.service.ts new file mode 100644 index 0000000..5023f8a --- /dev/null +++ b/src/app/store/familysuggest-pending.service.ts @@ -0,0 +1,42 @@ +import { Injectable } from '@angular/core'; +import {SessionDataProviderService} from "./session-data-provider.service"; +import {WrenchService} from "../services/wrench.service"; + +@Injectable({ + providedIn: 'root' +}) +export class FamilysuggestPendingService { + + constructor( + public sessionDataProviderService: SessionDataProviderService, + private wrenchService: WrenchService + ) { + //this.getFamilyPeningData(); + } + + usrData: { + action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0 + }; + suggestionTotal:number = 0; + familyPendingTotalData:any; + familyPendingData: []; + async getFamilyPeningData(){ + this.usrData = {action:22010, + member_id: this.sessionDataProviderService.member_id, + uid: this.sessionDataProviderService.member_uid, + sessionid: this.sessionDataProviderService.session , + limit:20, page:1,offset: 0} + + this.wrenchService.getFamilyPeningList(this.usrData).subscribe( + familyPendingTotalData => { + this.familyPendingTotalData = familyPendingTotalData; + console.log("familyPendingTotalData RETURN->", this.familyPendingTotalData); + this.familyPendingData = this.familyPendingTotalData.result_list; + // debugger; + console.log("FAMILY familyPendingData DATA->", this.familyPendingData); + this.suggestionTotal = this.familyPendingData.length; + } + ); + + } +}