Skip to content

Commit

Permalink
Fix: Add only parameters for collections in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifycode authored and tuxpiper committed Dec 10, 2024
1 parent ef670ad commit 9a80907
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/mobile-mzima-client/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { Component, Optional } from '@angular/core';
import { Router } from '@angular/router';
import { STORAGE_KEYS } from '@constants';
import { AlertController, IonRouterOutlet, Platform } from '@ionic/angular';
import { CollectionsService, MediaService, PostsService, SurveysService } from '@mzima-client/sdk';
import {
apiHelpers,
CollectionsService,
MediaService,
PostsService,
SurveysService,
} from '@mzima-client/sdk';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import {
DatabaseService,
Expand Down Expand Up @@ -120,6 +126,7 @@ export class AppComponent extends BaseComponent {
orderby: 'created',
order: 'desc',
q: '',
only: apiHelpers.ONLY.NAME_ID_DESCRIPTION,
};

return this.collectionsService.getCollections(params).pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ToastService,
} from '@services';
import {
apiHelpers,
CollectionItem,
CollectionsService,
NotificationsService,
Expand All @@ -28,6 +29,7 @@ interface CollectionsParams {
page: number;
q: string;
editableBy?: string;
only?: string;
}

enum CollectionAction {
Expand Down Expand Up @@ -73,6 +75,7 @@ export class ChooseCollectionComponent {
page: 1,
q: '',
editableBy: 'me',
only: apiHelpers.ONLY.NAME_ID_DESCRIPTION,
};
public roleOptions: any;
public userRole: string;
Expand Down

0 comments on commit 9a80907

Please sign in to comment.