diff --git a/package.json b/package.json index 5b31320..55d2c69 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@angular/router": "^14.0.0", "@capacitor-community/apple-sign-in": "^5.0.0", "@capacitor-community/barcode-scanner": "^4.0.1", + "@capacitor-community/contacts": "^5.0.4", "@capacitor-community/facebook-login": "^5.0.3", "@capacitor/android": "5.0.5", "@capacitor/app": "^5.0.0", diff --git a/src/app/pages/invite/invite.page.html b/src/app/pages/invite/invite.page.html index 1d89d48..544737c 100644 --- a/src/app/pages/invite/invite.page.html +++ b/src/app/pages/invite/invite.page.html @@ -10,55 +10,118 @@ +
Invite Firends
+ + + + + Invite with Email + +
+
+ + + + + + + + + + + + + + + +
+ + Send Invite + +
+ + + + + + + + + + + + +
+
+
+ + + Invite from Contacts + +
+
+ Refresh Contacts +
- - - Refer - - - History - - +
+
+
-
- - - Invite Friends - Enter email and name. - - - - - - + + + + + + + + - - - - + + + + + + - - - - + + + + + - - - - - - - Send - - - - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Recent Invitations
+
diff --git a/src/app/pages/invite/invite.page.scss b/src/app/pages/invite/invite.page.scss index f91591a..164da52 100644 --- a/src/app/pages/invite/invite.page.scss +++ b/src/app/pages/invite/invite.page.scss @@ -1,3 +1,9 @@ +.inv-head{ + font-weight: bolder; + font-size: 18px; + margin-bottom: 10px; +} + ion-item { --background: #f7f7f7; border-radius: 10px; diff --git a/src/app/pages/invite/invite.page.ts b/src/app/pages/invite/invite.page.ts index bc1becf..072514c 100644 --- a/src/app/pages/invite/invite.page.ts +++ b/src/app/pages/invite/invite.page.ts @@ -5,6 +5,7 @@ import { WrenchService } from 'src/app/services/wrench.service'; import {SessionDataProviderService} from "../../store/session-data-provider.service"; import {last} from "rxjs/operators"; import { AlertController } from '@ionic/angular'; +import {ContactsDataService} from "../../store/contacts-data.service"; @Component({ selector: 'app-invite', @@ -23,7 +24,8 @@ export class InvitePage implements OnInit { private router: Router, public sessionDataProviderService: SessionDataProviderService, private wrenchService: WrenchService, - private alertController: AlertController + private alertController: AlertController, + private contactsDataService:ContactsDataService ) { } /* @@ -128,4 +130,7 @@ export class InvitePage implements OnInit { // alert.present(); // // alert(amessage); } + refreshContacts(){ + this.contactsDataService.refeshContacts(); + } } diff --git a/src/app/pages/marketdetail/marketdetail.page.html b/src/app/pages/marketdetail/marketdetail.page.html index 3cb08bc..6ad00cb 100644 --- a/src/app/pages/marketdetail/marketdetail.page.html +++ b/src/app/pages/marketdetail/marketdetail.page.html @@ -28,7 +28,7 @@
- {{jobData.offer_code}} +
({{jobData.interest_count}} interest) @@ -62,6 +62,32 @@ + + + Interested in the task? + + + + Send Interest Request to Owner + {{interest_status}} + + + + + + Silhouette of mountains + + Waiting for feedback + Sent: {{interestDate |date}} + + + + You have already sent a notice of interest. If the owner accepts, you will receive a notification to start. + + + + +
{{jobData.offer_code}} diff --git a/src/app/store/REMEMBER.txt b/src/app/store/REMEMBER.txt index 6b3fc2f..81ff925 100644 --- a/src/app/store/REMEMBER.txt +++ b/src/app/store/REMEMBER.txt @@ -87,6 +87,9 @@ ionic generate component market-messages ionic generate service help-data ionic generate component job-details +ionic generate service contacts-data + + https://masteringionic.com/blog/working-with-capacitor-googlemaps-in-ionic ionic generate interface interfaces/location ionic generate interface interfaces/marker @@ -112,6 +115,8 @@ ionic generate service familysuggest-pending npm i @capacitor/camera @capacitor/filesystem +npm i @capacitor-community/contacts + https://devdactic.com/ionic-image-upload-capacitor diff --git a/src/app/store/contacts-data.service.spec.ts b/src/app/store/contacts-data.service.spec.ts new file mode 100644 index 0000000..8607532 --- /dev/null +++ b/src/app/store/contacts-data.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { ContactsDataService } from './contacts-data.service'; + +describe('ContactsDataService', () => { + let service: ContactsDataService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(ContactsDataService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/store/contacts-data.service.ts b/src/app/store/contacts-data.service.ts new file mode 100644 index 0000000..d48c6e6 --- /dev/null +++ b/src/app/store/contacts-data.service.ts @@ -0,0 +1,32 @@ +import { Injectable } from '@angular/core'; +import {Contacts } from "@capacitor-community/contacts"; +import { Plugin} from "@capacitor/core"; +//const { Contacts } = Plugins; + +import { isPlatform } from "@ionic/angular"; + +@Injectable({ + providedIn: 'root' +}) +export class ContactsDataService { + + constructor() { } + + + async refeshContacts(){ + + if (isPlatform('android') || isPlatform('iphone') || isPlatform('ios')){ + //return; + } + else{ + return; + } + Contacts.getContacts({projection: { + name: true, + phones: true, + image: true + }}).then( result=>{ + console.log(result); + }); + } +}