rel="diff-7030d0b2f71b999ff89a343de08c414af32fc93aR129">129
+ "mx.ferreyra.callnumber": "0.0.2",
|
|
|
130
|
+ "phonegap-plugin-multidex": "^1.0.0",
|
|
|
131
|
+ "phonegap-plugin-push": "^2.3.0",
|
|
|
132
|
+ "protractor": "~7.0.0",
|
|
|
133
|
+ "ts-node": "~10.4.0",
|
|
|
134
|
+ "typescript": "~4.2.4"
|
|
|
135
|
+ },
|
|
|
136
|
+ "description": "An Ionic project",
|
|
|
137
|
+ "cordova": {
|
|
|
138
|
+ "plugins": {
|
|
|
139
|
+ "cordova-plugin-ionic-keyboard": {},
|
|
|
140
|
+ "cordova-plugin-geolocation": {},
|
|
|
141
|
+ "cordova-plugin-nativegeocoder": {
|
|
|
142
|
+ "LOCATION_WHEN_IN_USE_DESCRIPTION": "Use geocoder service"
|
|
|
143
|
+ },
|
|
|
144
|
+ "mx.ferreyra.callnumber": {},
|
|
|
145
|
+ "cordova-plugin-email-composer": {},
|
|
|
146
|
+ "call-number": {},
|
|
|
147
|
+ "cordova-plugin-inappbrowser": {},
|
|
|
148
|
+ "cordova-plugin-sign-in-with-apple": {},
|
|
|
149
|
+ "cordova-plugin-androidx": {},
|
|
|
150
|
+ "cordova-plugin-androidx-adapter": {},
|
|
|
151
|
+ "phonegap-plugin-push": {},
|
|
|
152
|
+ "cordova-plugin-file-transfer": {},
|
|
|
153
|
+ "cordova-plugin-stripe": {},
|
|
|
154
|
+ "com.paypal.cordova.mobilesdk": {},
|
|
|
155
|
+ "cordova-plugin-whitelist": {},
|
|
|
156
|
+ "cordova-plugin-device": {},
|
|
|
157
|
+ "cordova-plugin-splashscreen": {},
|
|
|
158
|
+ "cordova-plugin-ionic-webview": {},
|
|
|
159
|
+ "cordova-plugin-facebook-connect": {
|
|
|
160
|
+ "APP_ID": "4746807965342529",
|
|
|
161
|
+ "APP_NAME": "FarmSter",
|
|
|
162
|
+ "FACEBOOK_URL_SCHEME_SUFFIX": " ",
|
|
|
163
|
+ "OTHER_APP_SCHEMES": " ",
|
|
|
164
|
+ "FACEBOOK_AUTO_LOG_APP_EVENTS": "true",
|
|
|
165
|
+ "FACEBOOK_HYBRID_APP_EVENTS": "false",
|
|
|
166
|
+ "FACEBOOK_ADVERTISER_ID_COLLECTION": "true",
|
|
|
167
|
+ "FACEBOOK_ANDROID_SDK_VERSION": "11.3.0",
|
|
|
168
|
+ "FACEBOOK_IOS_SDK_VERSION": "11.1.0",
|
|
|
169
|
+ "FACEBOOK_BROWSER_SDK_VERSION": "v11.0"
|
|
|
170
|
+ },
|
|
|
171
|
+ "cordova-plugin-statusbar": {},
|
|
|
172
|
+ "cordova-plugin-android-permissions": {},
|
|
|
173
|
+ "cordova-plugin-dreamover-uid": {}
|
|
|
174
|
+ },
|
|
|
175
|
+ "platforms": [
|
|
|
176
|
+ "ios",
|
|
|
177
|
+ "android"
|
|
|
178
|
+ ]
|
|
|
179
|
+ }
|
|
|
180
|
+}
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+These are Cordova resources. You can replace icon.png and splash.png and run
|
|
|
2
|
+`ionic cordova resources` to generate custom icons and splash screens for your
|
|
|
3
|
+app. See `ionic cordova resources --help` for details.
|
|
|
4
|
+
|
|
|
5
|
+Cordova reference documentation:
|
|
|
6
|
+
|
|
|
7
|
+- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
|
|
|
8
|
+- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
2
|
+<network-security-config>
|
|
|
3
|
+ <domain-config cleartextTrafficPermitted="true">
|
|
|
4
|
+ <domain includeSubdomains="true">localhost</domain>
|
|
|
5
|
+ <domain includeSubdomains="true">tamtime.iamarray.xyz</domain>
|
|
|
6
|
+ </domain-config>
|
|
|
7
|
+</network-security-config>
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+import { NgModule } from '@angular/core';
|
|
|
2
|
+import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
|
|
3
|
+
|
|
|
4
|
+const routes: Routes = [
|
|
|
5
|
+ {
|
|
|
6
|
+ path: '',
|
|
|
7
|
+ loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
|
|
|
8
|
+ },
|
|
|
9
|
+ {
|
|
|
10
|
+ path: 'home',
|
|
|
11
|
+ loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
|
|
|
12
|
+ },
|
|
|
13
|
+ {
|
|
|
14
|
+ path: 'register',
|
|
|
15
|
+ loadChildren: () => import('./register/register.module').then( m => m.RegisterPageModule)
|
|
|
16
|
+ },
|
|
|
17
|
+ {
|
|
|
18
|
+ path: 'login',
|
|
|
19
|
+ loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
|
|
|
20
|
+ },
|
|
|
21
|
+ {
|
|
|
22
|
+ path: 'forgot-password',
|
|
|
23
|
+ loadChildren: () => import('./forgot-password/forgot-password.module').then( m => m.ForgotPasswordPageModule)
|
|
|
24
|
+ },
|
|
|
25
|
+ {
|
|
|
26
|
+ path: 'register-form',
|
|
|
27
|
+ loadChildren: () => import('./register-form/register-form.module').then( m => m.RegisterFormPageModule)
|
|
|
28
|
+ },
|
|
|
29
|
+ {
|
|
|
30
|
+ path: 'profile',
|
|
|
31
|
+ loadChildren: () => import('./profile/profile.module').then( m => m.ProfilePageModule)
|
|
|
32
|
+ },
|
|
|
33
|
+ {
|
|
|
34
|
+ path: 'reset-password',
|
|
|
35
|
+ loadChildren: () => import('./reset-password/reset-password.module').then( m => m.ResetPasswordPageModule)
|
|
|
36
|
+ },
|
|
|
37
|
+ {
|
|
|
38
|
+ path: 'placedetail',
|
|
|
39
|
+ loadChildren: () => import('./placedetail/placedetail.module').then( m => m.PlacedetailPageModule)
|
|
|
40
|
+ },
|
|
|
41
|
+ {
|
|
|
42
|
+ path: 'place',
|
|
|
43
|
+ loadChildren: () => import('./place/place.module').then( m => m.PlacePageModule)
|
|
|
44
|
+ },
|
|
|
45
|
+ {
|
|
|
46
|
+ path: 'province',
|
|
|
47
|
+ loadChildren: () => import('./province/province.module').then( m => m.ProvincePageModule)
|
|
|
48
|
+ },
|
|
|
49
|
+ {
|
|
|
50
|
+ path: 'gmap',
|
|
|
51
|
+ loadChildren: () => import('./gmap/gmap.module').then( m => m.GmapPageModule)
|
|
|
52
|
+ },
|
|
|
53
|
+ {
|
|
|
54
|
+ path: 'nearme',
|
|
|
55
|
+ loadChildren: () => import('./nearme/nearme.module').then( m => m.NearmePageModule)
|
|
|
56
|
+ },
|
|
|
57
|
+ {
|
|
|
58
|
+ path: 'sample',
|
|
|
59
|
+ loadChildren: () => import('./sample/sample.module').then( m => m.SamplePageModule)
|
|
|
60
|
+ },
|
|
|
61
|
+ {
|
|
|
62
|
+ path: 'product',
|
|
|
63
|
+ loadChildren: () => import('./product/product.module').then( m => m.ProductPageModule)
|
|
|
64
|
+ },
|
|
|
65
|
+ {
|
|
|
66
|
+ path: 'product-detail',
|
|
|
67
|
+ loadChildren: () => import('./product-detail/product-detail.module').then( m => m.ProductDetailPageModule)
|
|
|
68
|
+ },
|
|
|
69
|
+ {
|
|
|
70
|
+ path: 'tracking',
|
|
|
71
|
+ loadChildren: () => import('./tracking/tracking.module').then( m => m.TrackingPageModule)
|
|
|
72
|
+ },
|
|
|
73
|
+ {
|
|
|
74
|
+ path: 'news',
|
|
|
75
|
+ loadChildren: () => import('./news/news.module').then( m => m.NewsPageModule)
|
|
|
76
|
+ },
|
|
|
77
|
+ {
|
|
|
78
|
+ path: 'checkout',
|
|
|
79
|
+ loadChildren: () => import('./checkout/checkout.module').then( m => m.CheckoutPageModule)
|
|
|
80
|
+ },
|
|
|
81
|
+ {
|
|
|
82
|
+ path: 'pay',
|
|
|
83
|
+ loadChildren: () => import('./pay/pay.module').then( m => m.PayPageModule)
|
|
|
84
|
+ }
|
|
|
85
|
+];
|
|
|
86
|
+@NgModule({
|
|
|
87
|
+ imports: [
|
|
|
88
|
+ RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
|
|
89
|
+ ],
|
|
|
90
|
+ exports: [RouterModule]
|
|
|
91
|
+})
|
|
|
92
|
+export class AppRoutingModule {}
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+<ion-app>
|
|
|
2
|
+ <ion-router-outlet></ion-router-outlet>
|
|
|
3
|
+</ion-app>
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+.product-title {
|
|
|
2
|
+ font-weight:bold;
|
|
|
3
|
+ font-size:20px;
|
|
|
4
|
+}
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
|
2
|
+import { TestBed, waitForAsync } from '@angular/core/testing';
|
|
|
3
|
+
|
|
|
4
|
+import { AppComponent } from './app.component';
|
|
|
5
|
+
|
|
|
6
|
+describe('AppComponent', () => {
|
|
|
7
|
+
|
|
|
8
|
+ beforeEach(waitForAsync(() => {
|
|
|
9
|
+
|
|
|
10
|
+ TestBed.configureTestingModule({
|
|
|
11
|
+ declarations: [AppComponent],
|
|
|
12
|
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
|
13
|
+ }).compileComponents();
|
|
|
14
|
+ }));
|
|
|
15
|
+
|
|
|
16
|
+ it('should create the app', () => {
|
|
|
17
|
+ const fixture = TestBed.createComponent(AppComponent);
|
|
|
18
|
+ const app = fixture.debugElement.componentInstance;
|
|
|
19
|
+ expect(app).toBeTruthy();
|
|
|
20
|
+ });
|
|
|
21
|
+ // TODO: add more tests!
|
|
|
22
|
+
|
|
|
23
|
+});
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+import { Component } from '@angular/core';
|
|
|
2
|
+import { Storage } from '@ionic/storage-angular';
|
|
|
3
|
+import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
|
|
|
4
|
+import { Uid } from '@ionic-native/uid/ngx';
|
|
|
5
|
+import { AndroidPermissions } from '@ionic-native/android-permissions/ngx';
|
|
|
6
|
+
|
|
|
7
|
+
|
|
|
8
|
+@Component({
|
|
|
9
|
+ selector: 'app-root',
|
|
|
10
|
+ templateUrl: 'app.component.html',
|
|
|
11
|
+ styleUrls: ['app.component.scss'],
|
|
|
12
|
+})
|
|
|
13
|
+export class AppComponent {
|
|
|
14
|
+ constructor(private storage: Storage, private statusBar:StatusBar, private uid: Uid, private androidPermissions: AndroidPermissions) {
|
|
|
15
|
+
|
|
|
16
|
+ this.statusBar.overlaysWebView(true);
|
|
|
17
|
+
|
|
|
18
|
+
|
|
|
19
|
+ }
|
|
|
20
|
+ openQRCode() {
|
|
|
21
|
+ console.log("open QR Code");
|
|
|
22
|
+ }
|
|
|
23
|
+ async ngOnInit() {
|
|
|
24
|
+ // If using a custom driver:
|
|
|
25
|
+ // await this.storage.defineDriver(MyCustomDriver)
|
|
|
26
|
+ await this.storage.create();
|
|
|
27
|
+ //await this.getImei();
|
|
|
28
|
+ }
|
|
|
29
|
+ async getImei() {
|
|
|
30
|
+ const { hasPermission } = await this.androidPermissions.checkPermission(
|
|
|
31
|
+ this.androidPermissions.PERMISSION.READ_PHONE_STATE
|
|
|
32
|
+ );
|
|
|
33
|
+ console.log(hasPermission);
|
|
|
34
|
+
|
|
|
35
|
+ if (!hasPermission) {
|
|
|
36
|
+ const result = await this.androidPermissions.requestPermission(
|
|
|
37
|
+ this.androidPermissions.PERMISSION.READ_PHONE_STATE
|
|
|
38
|
+ );
|
|
|
39
|
+
|
|
|
40
|
+ if (!result.hasPermission) {
|
|
|
41
|
+ throw new Error('Permissions required');
|
|
|
42
|
+ }
|
|
|
43
|
+
|
|
|
44
|
+ // ok, a user gave us permission, we can get him identifiers after restart app
|
|
|
45
|
+ return;
|
|
|
46
|
+ }
|
|
|
47
|
+ console.log("UUID");
|
|
|
48
|
+ console.log(this.uid.UUID);
|
|
|
49
|
+ await this.storage.set('uid', this.uid.UUID);
|
|
|
50
|
+ return this.uid.IMEI
|
|
|
51
|
+ }
|
|
|
52
|
+}
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+import { NgModule } from '@angular/core';
|
|
|
2
|
+import { BrowserModule } from '@angular/platform-browser';
|
|
|
3
|
+import { RouteReuseStrategy } from '@angular/router';
|
|
|
4
|
+
|
|
|
5
|
+import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
|
|
6
|
+
|
|
|
7
|
+import { AppRoutingModule } from './app-routing.module';
|
|
|
8
|
+import { AppComponent } from './app.component';
|
|
|
9
|
+
|
|
|
10
|
+import { HttpClientModule, HttpClient} from '@angular/common/http';
|
|
|
11
|
+
|
|
|
12
|
+// import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
|
13
|
+// import { library } from '@fortawesome/fontawesome-svg-core';
|
|
|
14
|
+import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
|
|
15
|
+import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
|
16
|
+import { far } from '@fortawesome/free-regular-svg-icons';
|
|
|
17
|
+import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
|
18
|
+
|
|
|
19
|
+import { Geolocation } from '@ionic-native/geolocation/ngx';
|
|
|
20
|
+import { NativeGeocoder } from '@ionic-native/native-geocoder/ngx';
|
|
|
21
|
+
|
|
|
22
|
+import { CallNumber } from '@ionic-native/call-number/ngx';
|
|
|
23
|
+import { EmailComposer } from '@ionic-native/email-composer/ngx';
|
|
|
24
|
+import { HTTP } from '@ionic-native/http/ngx';
|
|
|
25
|
+import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
|
26
|
+
|
|
|
27
|
+import { IonicStorageModule } from '@ionic/storage-angular';
|
|
|
28
|
+import { SignInWithApple } from '@ionic-native/sign-in-with-apple/ngx';
|
|
|
29
|
+
|
|
|
30
|
+import { PipeModule } from './pipe/pipe.module';
|
|
|
31
|
+import { Facebook } from '@ionic-native/facebook/ngx';
|
|
|
32
|
+
|
|
|
33
|
+import { BarcodeScanner } from '@awesome-cordova-plugins/barcode-scanner/ngx';
|
|
|
34
|
+import { PayPal } from '@ionic-native/paypal/ngx';
|
|
|
35
|
+import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
|
|
|
36
|
+import { Uid } from '@ionic-native/uid/ngx';
|
|
|
37
|
+import { AndroidPermissions } from '@ionic-native/android-permissions/ngx';
|
|
|
38
|
+import { Device } from '@ionic-native/device/ngx';
|
|
|
39
|
+
|
|
|
40
|
+//import { Stripe } from '@awesome-cordova-plugins/stripe/ngx';
|
|
|
41
|
+
|
|
|
42
|
+
|
|
|
43
|
+// import { IonicImageViewerModule } from 'ionic-img-viewer';
|
|
|
44
|
+
|
|
|
45
|
+
|
|
|
46
|
+// library.add(fas,far,fab);
|
|
|
47
|
+
|
|
|
48
|
+@NgModule({
|
|
|
49
|
+ declarations: [AppComponent],
|
|
|
50
|
+ entryComponents: [],
|
|
|
51
|
+ imports: [HttpClientModule, BrowserModule, PipeModule,IonicModule.forRoot({_forceStatusbarPadding: true}), AppRoutingModule, FontAwesomeModule, IonicStorageModule.forRoot()],
|
|
|
52
|
+ providers: [
|
|
|
53
|
+ Geolocation,
|
|
|
54
|
+ NativeGeocoder,
|
|
|
55
|
+ CallNumber,
|
|
|
56
|
+ EmailComposer,
|
|
|
57
|
+ InAppBrowser,
|
|
|
58
|
+ HTTP,
|
|
|
59
|
+ Facebook,
|
|
|
60
|
+ StatusBar,
|
|
|
61
|
+ BarcodeScanner,
|
|
|
62
|
+ SignInWithApple,
|
|
|
63
|
+ PayPal,
|
|
|
64
|
+ AndroidPermissions,
|
|
|
65
|
+ Uid,
|
|
|
66
|
+ Device,
|
|
|
67
|
+ //Stripe,
|
|
|
68
|
+ { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
|
|
|
69
|
+ ],
|
|
|
70
|
+ bootstrap: [AppComponent],
|
|
|
71
|
+})
|
|
|
72
|
+export class AppModule {
|
|
|
73
|
+ constructor(library: FaIconLibrary) {
|
|
|
74
|
+ library.addIconPacks(fas, fab, far);
|
|
|
75
|
+ }
|
|
|
76
|
+
|
|
|
77
|
+}
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+import { NgModule } from '@angular/core';
|
|
|
2
|
+import { Routes, RouterModule } from '@angular/router';
|
|
|
3
|
+
|
|
|
4
|
+import { CheckoutPage } from './checkout.page';
|
|
|
5
|
+
|
|
|
6
|
+const routes: Routes = [
|
|
|
7
|
+ {
|
|
|
8
|
+ path: '',
|
|
|
9
|
+ component: CheckoutPage
|
|
|
10
|
+ }
|
|
|
11
|
+];
|
|
|
12
|
+
|
|
|
13
|
+@NgModule({
|
|
|
14
|
+ imports: [RouterModule.forChild(routes)],
|
|
|
15
|
+ exports: [RouterModule],
|
|
|
16
|
+})
|
|
|
17
|
+export class CheckoutPageRoutingModule {}
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+import { NgModule } from '@angular/core';
|
|
|
2
|
+import { CommonModule } from '@angular/common';
|
|
|
3
|
+import { FormsModule } from '@angular/forms';
|
|
|
4
|
+
|
|
|
5
|
+import { IonicModule } from '@ionic/angular';
|
|
|
6
|
+
|
|
|
7
|
+import { CheckoutPageRoutingModule } from './checkout-routing.module';
|
|
|
8
|
+
|
|
|
9
|
+import { CheckoutPage } from './checkout.page';
|
|
|
10
|
+
|
|
|
11
|
+@NgModule({
|
|
|
12
|
+ imports: [
|
|
|
13
|
+ CommonModule,
|
|
|
14
|
+ FormsModule,
|
|
|
15
|
+ IonicModule,
|
|
|
16
|
+ CheckoutPageRoutingModule
|
|
|
17
|
+ ],
|
|
|
18
|
+ declarations: [CheckoutPage]
|
|
|
19
|
+})
|
|
|
20
|
+export class CheckoutPageModule {}
|