Skip to content

Commit

Permalink
fix: #178 fix ui and bug admin portal (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannd4 authored Feb 26, 2020
1 parent 608bce5 commit b6bb64a
Show file tree
Hide file tree
Showing 18 changed files with 430 additions and 392 deletions.
1 change: 0 additions & 1 deletion packages/elements/src/components/Pagination/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const generatePagination = (currentPage: number, pageCount: number) => {

export const Pagination = ({ onChange, pageNumber = 1, pageSize = 1, totalCount = 1 }: PaginationProps) => {
const maxPage = Math.ceil(totalCount / pageSize)

if (maxPage < 2) {
return null
}
Expand Down
2 changes: 1 addition & 1 deletion packages/marketplace/src/actions/__tests__/admin-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('adminApps actions', () => {

it('should create a adminAppsRequestData action', () => {
expect(adminAppsRequestData.type).toEqual(ActionTypes.ADMIN_APPS_REQUEST_DATA)
expect(adminAppsRequestData().data).toEqual(undefined)
expect(adminAppsRequestData({ pageNumber: 1 }).data).toEqual({ pageNumber: 1 })
})

it('should create a adminAppsRequestFailure action', () => {
Expand Down
9 changes: 8 additions & 1 deletion packages/marketplace/src/actions/admin-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ export type AdminAppsFeaturedParams = {
isFeatured: boolean
}

export const adminAppsRequestData = actionCreator<void>(ActionTypes.ADMIN_APPS_REQUEST_DATA)
export type AdminAppsParams = {
pageNumber?: number
appName?: string
developerName?: string
companyName?: string
}

export const adminAppsRequestData = actionCreator<AdminAppsParams>(ActionTypes.ADMIN_APPS_REQUEST_DATA)
export const adminAppsReceiveData = actionCreator<PagedResultAppSummaryModel_>(ActionTypes.ADMIN_APPS_RECEIVE_DATA)
export const adminAppsRequestFailure = actionCreator<void>(ActionTypes.ADMIN_APPS_REQUEST_FAILURE)
export const adminAppsRequestFeatured = actionCreator<AdminAppsFeaturedParams>(ActionTypes.ADMIN_APPS_REQUEST_FEATURED)
Expand Down
Loading

0 comments on commit b6bb64a

Please sign in to comment.