|
@@ -11,11 +11,13 @@ import { ParseService } from 'src/app/services/parse.service';
|
|
styleUrls: ['./smovies.page.scss'],
|
|
styleUrls: ['./smovies.page.scss'],
|
|
})
|
|
})
|
|
export class SMoviesPage implements OnInit {
|
|
export class SMoviesPage implements OnInit {
|
|
-
|
|
|
|
|
|
+//
|
|
|
|
+ user:Parse.User|undefined
|
|
ngOnInit(): void {
|
|
ngOnInit(): void {
|
|
-
|
|
|
|
|
|
+ this.user = Parse.User.current();
|
|
|
|
+ this.fetchMovies();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+//
|
|
constructor(private navCtrl: NavController,private router: Router,private parseService: ParseService) {
|
|
constructor(private navCtrl: NavController,private router: Router,private parseService: ParseService) {
|
|
this.fetchMovies();
|
|
this.fetchMovies();
|
|
}
|
|
}
|
|
@@ -52,6 +54,9 @@ export class SMoviesPage implements OnInit {
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if (category === '') {
|
|
if (category === '') {
|
|
this.filteredMovies = this.allMovies;
|
|
this.filteredMovies = this.allMovies;
|
|
} else {
|
|
} else {
|
|
@@ -63,9 +68,11 @@ export class SMoviesPage implements OnInit {
|
|
|
|
|
|
filteredMovies: any[] = [];
|
|
filteredMovies: any[] = [];
|
|
allMovies: any[] = [];
|
|
allMovies: any[] = [];
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ searchQuery: string = '';
|
|
|
|
+ selectedType: string = '';
|
|
|
|
+
|
|
async fetchMovies() {
|
|
async fetchMovies() {
|
|
|
|
+
|
|
const YJMovies = Parse.Object.extend('YJMovies');
|
|
const YJMovies = Parse.Object.extend('YJMovies');
|
|
const query = new Parse.Query(YJMovies);
|
|
const query = new Parse.Query(YJMovies);
|
|
this.allMovies = await query.find();
|
|
this.allMovies = await query.find();
|