Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project spa samples page #1435

Draft
wants to merge 136 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
bfe8f1c
chore: Initial layout
joshsadam Nov 30, 2022
46551e0
chore: Initial menu setup
joshsadam Nov 30, 2022
bde6a04
chore: Added global search and cart link
joshsadam Dec 1, 2022
881109e
chore: Added in user account submenu
joshsadam Dec 1, 2022
d5c0c44
chore: Updated announcements link
joshsadam Dec 1, 2022
0cfa788
chore: Updated search form to be more dynamic
joshsadam Dec 1, 2022
2c485e4
chore: Cleaned up search icon when used in prefix
joshsadam Dec 1, 2022
ed8b3b2
chore: Updated typescript definitions
joshsadam Dec 1, 2022
30d7faa
chore: Removed old main navigation files
joshsadam Dec 1, 2022
2538e23
chore: Removed unused vendor entry and files.
joshsadam Dec 1, 2022
81f2936
chore: File should not have been removed
joshsadam Dec 1, 2022
74b2ea8
Merge branch 'remove-vendor-bundle' into project-spa
joshsadam Dec 2, 2022
28b79c1
chore: Updated favicon
joshsadam Dec 2, 2022
d4c4e27
chore: Added `theme` back as attribute on page body
joshsadam Dec 2, 2022
c7bdcb2
chore: Fixed the way roles are passed down for the CurrentUser
joshsadam Dec 2, 2022
bd503b4
refactor: Moved code to top level so this does not have to be done at…
joshsadam Dec 2, 2022
e97888b
Merge branch 'remove-vendor-bundle' into project-spa
joshsadam Dec 2, 2022
4d343dd
chore: Removed TODO statement
joshsadam Dec 2, 2022
5f3d914
chore: Updated JavaDoc
joshsadam Dec 2, 2022
e18b7ab
chore: Added comment on where the root SPA file found
joshsadam Dec 2, 2022
482d1a7
chore: Added JSDoc
joshsadam Dec 2, 2022
6e71fe6
chore: Added JSDoc
joshsadam Dec 2, 2022
e123fb4
chore: Added JSDoc
joshsadam Dec 2, 2022
b820a28
chore: Added username to CurrentUser type
joshsadam Dec 2, 2022
b8d115a
chore: Added internationalization for guides
joshsadam Dec 2, 2022
5c6d111
chore: Added JSDoc
joshsadam Dec 2, 2022
52231ad
chore: Added JSDoc
joshsadam Dec 2, 2022
cccbd8d
chore: Added JSDoc
joshsadam Dec 2, 2022
70a28ac
chore: Added JSDoc
joshsadam Dec 2, 2022
d492064
chore: Added JSDoc
joshsadam Dec 2, 2022
8cb8720
chore: Sorted properties of MenuItem type
joshsadam Dec 2, 2022
acd8896
chore: Added JSDoc for where to find the context
joshsadam Dec 2, 2022
a5ad6c3
Merge branch 'project-spa-base' into project-spa
joshsadam Dec 2, 2022
5b877f5
chore: Updated name of cart count tag
joshsadam Dec 2, 2022
14d55df
chore: Used useMemo for the user initials
joshsadam Dec 2, 2022
500c52f
Merge pull request #1421 from phac-nml/project-spa
deepsidhu85 Dec 2, 2022
2f1102d
refactor: Moved AppLayout to it's own file
joshsadam Dec 5, 2022
805ff5e
refactor: Added in project navigation
joshsadam Dec 5, 2022
5caa9c7
refactor: Extracted project navigation into it's own component
joshsadam Dec 5, 2022
405ec90
chore: Updated JSDoc
joshsadam Dec 5, 2022
5ef5821
chore: Updated JSDoc
joshsadam Dec 5, 2022
cf3b8df
chore: Disabled all tests that require the project details pages
joshsadam Dec 6, 2022
1564f0a
Merge pull request #1423 from phac-nml/project-spa-navigation
deepsidhu85 Dec 6, 2022
9a1e6eb
chore: Added back taxonomy request
joshsadam Dec 6, 2022
5cb8f44
chore: Re-add missing functions
joshsadam Dec 6, 2022
4295912
chore: Working on typing Samples
joshsadam Dec 6, 2022
e4674ea
chore: Updated dashboard test since file name changed
joshsadam Dec 6, 2022
8cb499b
chore: More sample types
joshsadam Dec 6, 2022
dee742f
chore: Fixed link class to admin panel
joshsadam Dec 7, 2022
ef121c0
chore: Fixed search after variable name change
joshsadam Dec 7, 2022
d613ea4
chore: More sample types
joshsadam Dec 7, 2022
2e4e72d
Merge branch 'development' into project-spa-base
joshsadam Dec 7, 2022
703cda6
refactor: Removed thunk from update table
joshsadam Dec 7, 2022
4861115
refactor: Changed to typescript and updated updateTable with types
joshsadam Dec 7, 2022
2d38af0
refactor: Fixed typings for selectAllSamples
joshsadam Dec 7, 2022
efe6798
refactor: Moved add samples to cart into cartApi
joshsadam Dec 7, 2022
3d56d7b
refactor: Cleaned up remaining types
joshsadam Dec 7, 2022
5d24578
Merge branch 'project-spa-base' into project-spa-initial-testing
joshsadam Dec 7, 2022
f760797
refactor: Updated announcement modal for high priority announcements
joshsadam Dec 8, 2022
4a3008c
refactor: Updated name of query to reflect high priority
joshsadam Dec 8, 2022
c4f10c9
Merge branch 'project-spa-initial-testing' into project-spa-samples-page
joshsadam Dec 8, 2022
38ebf39
Merge branch 'sampleSlice-typescript' into project-spa-samples-page
joshsadam Dec 8, 2022
b768d89
refactor: Initial working table with only sample name
joshsadam Dec 9, 2022
79ac6ae
refactor: Adding back more columns
joshsadam Dec 12, 2022
cb7c774
refactor: Updating types for useSamplesTableState
joshsadam Dec 12, 2022
6191785
refactor: Working associated projects
joshsadam Dec 12, 2022
0c2fc22
refactor: Fixed clearing date filters
joshsadam Dec 12, 2022
f65360a
chore: Removed borders from table
joshsadam Dec 12, 2022
a0967c6
refactor: Fixed type of filters
joshsadam Dec 12, 2022
506dd87
Merge branch 'development' into project-spa-base
joshsadam Dec 12, 2022
3c4b8c8
Merge branch 'project-spa-base' into project-spa-initial-testing
joshsadam Dec 12, 2022
0c842f1
Merge branch 'project-spa-initial-testing' into project-spa-samples-page
joshsadam Dec 12, 2022
6b1a0ca
refactor: Updated to use redux for state
joshsadam Dec 13, 2022
51ff827
refactor: Working on slice
joshsadam Dec 13, 2022
d431f6f
refactor: Working on switching to using context
joshsadam Dec 14, 2022
b27152e
refactor: Moving items over to context
joshsadam Dec 14, 2022
448fa52
chore: Cleaned up selectioin
joshsadam Dec 14, 2022
77d41ea
chore: Row selection working
joshsadam Dec 14, 2022
a7a863e
chore: Updated comments
joshsadam Dec 14, 2022
3b7fa81
chore: Unselect all now works
joshsadam Dec 14, 2022
4d98f1b
chore: Working on selecting all samples
joshsadam Dec 15, 2022
27f8b0d
chore: Working on adding minimal sample details to api
joshsadam Dec 15, 2022
4df4932
chore: Updated select/deselect all samples
joshsadam Dec 19, 2022
477e158
chore: Fixed selection while paging
joshsadam Dec 20, 2022
364b41c
chore: Updating date filters
joshsadam Dec 20, 2022
32e4b03
chore: Working date filters
joshsadam Dec 20, 2022
2f3d39a
chore: Cleaning up types on date-column-search.tsx
joshsadam Dec 20, 2022
99a3fda
chore: Cleanup of setting and clearing filters
joshsadam Dec 21, 2022
9387a3a
chore: Working on sample tools menu
joshsadam Dec 21, 2022
86a7660
chore: Working on updating merge modal code
joshsadam Dec 22, 2022
525a6b4
chore: Working on updating merge modal code
joshsadam Jan 5, 2023
2805ccb
Merge pull request #1425 from phac-nml/project-spa-initial-testing
deepsidhu85 Jan 6, 2023
0c4e5de
Merge branch 'development' into project-spa-base
joshsadam Jan 9, 2023
97219a0
Merge remote-tracking branch 'origin/project-spa-base' into project-s…
joshsadam Jan 9, 2023
c589f7a
Merge branch 'project-spa-base' into project-spa-samples-page
joshsadam Jan 9, 2023
fc4400f
chore: Getting merge modal to work with new code
joshsadam Jan 11, 2023
3d43194
chore: Working merge samples
joshsadam Jan 11, 2023
39dba7d
chore: Cleaned up type gaurd
joshsadam Jan 11, 2023
2e2c276
chore: Clean up typings for data-column-search.tsx
joshsadam Jan 12, 2023
bec1fba
chore: Comment cleanup
joshsadam Jan 12, 2023
d20baf2
chore: Make sure samples in populated before opening the modal
joshsadam Jan 12, 2023
00697a1
chore: Fixed typing issue
joshsadam Jan 12, 2023
7e1fb0c
chore: Added info modal if incorrect samples selected to merge
joshsadam Jan 13, 2023
a05cc44
chore: Updated i18n of error modal
joshsadam Jan 13, 2023
8854b1b
chore: Added proper spacing for dropdown
joshsadam Jan 13, 2023
e804599
Merge branch 'development' into project-spa-base
joshsadam Jan 13, 2023
3865d7a
Merge branch 'project-spa-base' into project-spa-samples-page
joshsadam Jan 13, 2023
14540a4
chore: Fixed typo
joshsadam Jan 13, 2023
c7777a7
chore: Removed unused `buildCreateApi` import
joshsadam Jan 13, 2023
7fce997
chore: Removed unused import for `direction`
joshsadam Jan 13, 2023
c074b06
chore: Changed type for converage from `any` to `unknown`
joshsadam Jan 13, 2023
16a19d2
chore: Removed old project sample files
joshsadam Jan 13, 2023
f9b08c6
chore: Removed unused import for `SearchOutlined`
joshsadam Jan 13, 2023
d223084
chore: Set component definition display name
joshsadam Jan 13, 2023
8357832
chore: Removed unused generic type annotation
joshsadam Jan 13, 2023
ba08b59
fix: LockedSamplesList was moved in the current PR
joshsadam Jan 16, 2023
0188cce
doc: Updated JSDoc for column-search.tsx
joshsadam Jan 16, 2023
717ea07
chore: Updated internationalization for page loading
joshsadam Jan 16, 2023
d7fc1d0
chore: Typed project api
joshsadam Jan 16, 2023
2879915
chore: Typed project-samples api
joshsadam Jan 16, 2023
efe422f
chore: Removed unused file
joshsadam Jan 16, 2023
7db44b6
Merge branch 'development' into project-spa-base
joshsadam Jan 17, 2023
84f8728
Merge branch 'project-spa-base' into project-spa-samples-page
joshsadam Jan 17, 2023
d2289e6
chore: fixed missing imports
ericenns Jan 17, 2023
72ee455
Merge branch 'project-spa-base' into project-spa-samples-page
joshsadam Jan 17, 2023
4a17164
chore: More cleanups
joshsadam Jan 17, 2023
b0aac01
chore: Need ProjectDetails to match BaseItem
joshsadam Jan 18, 2023
b49a506
chore: Ass useCallback for table on change handler
joshsadam Jan 18, 2023
85562a9
chore: Cleaned up the useProjectSamplesContext
joshsadam Jan 18, 2023
996d057
chore: Updated page level error boundary
joshsadam Jan 18, 2023
73f4783
test: Fixed test for 404
joshsadam Jan 18, 2023
e039441
test: Fixed broken tests to to table class name
joshsadam Jan 18, 2023
e459ad9
chore: Remove unwanted class SpaBase
joshsadam Jan 18, 2023
251c454
test: Disabled test that would fail since functionality not added bac…
joshsadam Jan 18, 2023
5ccd744
chore: Removed unused class
joshsadam Jan 18, 2023
b387c35
fix: Fixed table summary column width
joshsadam Jan 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
@Controller
public class DashboardController {
private static final String DASHBOARD_PAGE = "index";
private static final String DASHBOARD_PAGE = "dashboard";
private static final Logger logger = LoggerFactory.getLogger(DashboardController.class);

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ca.corefacility.bioinformatics.irida.ria.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
* Only controller to be used for IRIDA SPA
*/
@Controller
public class SPAController {

/**
* Entry point for IRIDA SPA.
*
* @return Index page.
*/
@GetMapping("/projects/**")
public String getSPAEntry() {
return "index";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ public class CurrentUser {
private String firstName;
private String lastName;
private boolean isAdmin;
private boolean isManager;
private boolean isTechnician;

public CurrentUser(User user) {
this.identifier = user.getId();
this.username = user.getUsername();
this.firstName = user.getFirstName();
this.lastName = user.getLastName();
this.isAdmin = user.getSystemRole().equals(Role.ROLE_ADMIN);
this.isManager = user.getSystemRole().equals(Role.ROLE_MANAGER);
this.isTechnician = user.getSystemRole().equals(Role.ROLE_TECHNICIAN);
}

public Long getIdentifier() {
Expand All @@ -37,7 +41,15 @@ public String getLastName() {
return lastName;
}

public boolean isAdmin() {
public boolean getIsAdmin() {
return isAdmin;
}

public boolean getIsManager() {
return isManager;
}

public boolean getIsTechnician() {
return isTechnician;
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package ca.corefacility.bioinformatics.irida.ria.web.announcements;

import java.security.Principal;
import java.util.List;

import ca.corefacility.bioinformatics.irida.model.announcements.AnnouncementUserJoin;
import ca.corefacility.bioinformatics.irida.ria.web.announcements.dto.AnnouncementUserReadDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import ca.corefacility.bioinformatics.irida.model.announcements.Announcement;
import ca.corefacility.bioinformatics.irida.model.announcements.AnnouncementUserJoin;
import ca.corefacility.bioinformatics.irida.ria.web.announcements.dto.AnnouncementRequest;
import ca.corefacility.bioinformatics.irida.ria.web.announcements.dto.AnnouncementTableModel;
import ca.corefacility.bioinformatics.irida.ria.web.announcements.dto.AnnouncementUserReadDetails;
import ca.corefacility.bioinformatics.irida.ria.web.announcements.dto.AnnouncementUserTableModel;
import ca.corefacility.bioinformatics.irida.ria.web.models.tables.TableRequest;
import ca.corefacility.bioinformatics.irida.ria.web.models.tables.TableResponse;
import ca.corefacility.bioinformatics.irida.ria.web.services.UIAnnouncementsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.security.Principal;
import java.util.List;

/**
* Controller for all ajax requests from the UI for announcements.
Expand All @@ -41,6 +40,16 @@ public TableResponse<AnnouncementTableModel> getAnnouncementsAdmin(@RequestBody
return service.getAnnouncementsAdmin(tableRequest);
}

/**
* Get the total number of unread announcement for a user.
*
* @return number of unread announcements
*/
@GetMapping("/count")
public int getUnreadAnnouncementCount() {
return service.getUnreadAnnouncementsCount();
}

/**
* Handle request for getting a list of read and unread announcements for a user.
*
Expand Down
Loading