Skip to content

Commit c65a9a2

Browse files
committed
final fixes for TaaS work
1 parent 9e85a0a commit c65a9a2

File tree

7 files changed

+273
-236
lines changed

7 files changed

+273
-236
lines changed

src/actions/sidebar.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,25 @@ export function setActiveProject (projectId) {
2828
/**
2929
* Loads projects of the authenticated user
3030
*/
31-
export function loadProjects (filterProjectName = '', myProjects = true) {
31+
export function loadProjects (filterProjectName = '', myProjects = true, paramFilters = {}) {
3232
return (dispatch) => {
3333
dispatch({
3434
type: LOAD_PROJECTS_PENDING
3535
})
3636

37-
const filters = {}
37+
const filters = {
38+
status: 'active',
39+
sort: 'lastActivityAt desc',
40+
...paramFilters
41+
}
3842
if (!_.isEmpty(filterProjectName)) {
3943
if (!isNaN(filterProjectName)) { // if it is number
4044
filters['id'] = parseInt(filterProjectName, 10)
4145
} else { // text search
4246
filters['keyword'] = decodeURIComponent(filterProjectName)
4347
}
4448
}
45-
filters['status'] = 'active'
46-
filters['sort'] = 'lastActivityAt desc'
49+
4750
// filters['perPage'] = 20
4851
// filters['page'] = 1
4952
if (myProjects) {

src/containers/TaaSList/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import TaaSProjectCard from '../../components/TaaSProjectCard'
66
import Loader from '../../components/Loader'
77
import cn from 'classnames'
88
import { checkAdmin, checkCopilot } from '../../util/tc'
9-
import { OutlineButton } from '../../components/Buttons'
9+
import { PrimaryButton } from '../../components/Buttons'
1010

1111
import styles from './styles.module.scss'
1212

@@ -29,8 +29,8 @@ const TaaSList = ({ taasProjects, auth, isLoading }) => {
2929
<div>No project selected. Select one below</div>
3030
{(isCopilot || isAdmin) && (
3131
<Link className={styles.buttonCreateNewTaaS} to='/taas/new'>
32-
<OutlineButton
33-
text='New TaaS Project'
32+
<PrimaryButton
33+
text='Create TaaS Project'
3434
type='info'
3535
submit
3636
/>

src/containers/TaaSList/styles.module.scss

+13
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,16 @@
3030
.canEdit {
3131
cursor: pointer;
3232
}
33+
34+
35+
.buttonCreateNewTaaS {
36+
min-width: 169px;
37+
height: 40px;
38+
text-decoration: none;
39+
40+
:global {
41+
span {
42+
margin: 0 20px;
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)