feat: add catalog module

This commit is contained in:
Rainer Killinger
2021-07-02 10:27:31 +02:00
committed by Jovan Krunić
parent e628f396e2
commit 03084b1c96
24 changed files with 744 additions and 45 deletions

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, Input} from '@angular/core';
import {Component, Input, OnInit, OnDestroy} from '@angular/core';
import {Router} from '@angular/router';
import {AlertController} from '@ionic/angular';
import {
@@ -39,7 +39,7 @@ import {PositionService} from '../../map/position.service';
templateUrl: 'search-page.html',
providers: [ContextMenuService],
})
export class SearchPageComponent {
export class SearchPageComponent implements OnInit, OnDestroy {
/**
* Api query filter
*/
@@ -126,9 +126,7 @@ export class SearchPageComponent {
protected dataRoutingService: DataRoutingService,
protected router: Router,
protected positionService: PositionService,
) {
this.initialize();
}
) {}
/**
* Fetches items with set query configuration
@@ -230,7 +228,8 @@ export class SearchPageComponent {
this.contextMenuService.updateContextFilter(facets);
}
ionViewWillEnter() {
ngOnInit() {
this.initialize();
this.contextMenuService.setContextSort({
name: 'sort',
reversed: false,
@@ -290,7 +289,7 @@ export class SearchPageComponent {
);
}
ionViewWillLeave() {
ngOnDestroy() {
for (const subscription of this.subscriptions) {
subscription.unsubscribe();
}