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

SIMSBIOHUB-591: Show all user's data on Project page & add search functionality #1296

Merged
merged 105 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 104 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
26f6af5
fix: updated telemetry pings opacity + table columns
MacQSL May 3, 2024
d74b9d1
feat: added usePersistentState hook for managing localStorage state
MacQSL May 6, 2024
795e5d6
feat: updated index.tsx to use React 18 root + manage telemetry impro…
MacQSL May 8, 2024
0612110
refactor: updated telemtryTableContext functions and fixed console error
MacQSL May 9, 2024
e75f819
feat: added generic column definitions + telemetry table column defin…
MacQSL May 9, 2024
1e51c41
fix: updated column visibility functions to be in the table context +…
MacQSL May 10, 2024
7006dc4
feat: added critterDeployments to surveyContext
MacQSL May 10, 2024
952aaba
Merge branch 'dev' into SIMSBIOHUB-572
MacQSL May 10, 2024
9ef6d52
fix: updated check-env makefile command
MacQSL May 10, 2024
74116dc
fix: validation now working again for missing fields
MacQSL May 13, 2024
79a27c6
fix: updated validation for telemtry rows
MacQSL May 13, 2024
5c1732a
fix: removed unused test from useSurveyApi
MacQSL May 13, 2024
0423c83
fix: surveyData table was rendering incorrect values for critter depl…
MacQSL May 13, 2024
97eeea8
fix: updated styling for survey progress select
MacQSL May 14, 2024
632a3a2
fix: starting project region seed
MacQSL May 14, 2024
a7b7cf6
fix: Promise.all for service meta
MacQSL May 14, 2024
9675310
Merge branch 'SIMSBIOHUB-578' into SIMSBIOHUB-572
MacQSL May 14, 2024
9e5e7af
feat: added project regions to seed projects
MacQSL May 14, 2024
985f0f9
fix: ran formatter
MacQSL May 14, 2024
22a6cee
feat: deprecated project_region table + updated seed to populate surv…
MacQSL May 15, 2024
b2cc28f
fix: ran formatter + updated comments in telemetryTableContext
MacQSL May 15, 2024
234d426
fix: corrected bugs in usePersistentState hook + updated tests
MacQSL May 15, 2024
b39f447
fix: solarCloud nit
MacQSL May 15, 2024
a34a006
fix: updated setState initial value in usePersistentState
MacQSL May 15, 2024
e1a8ac1
fix: updated device form to handle null values on upsert
MacQSL May 16, 2024
838b35e
fix: updated edit state and fixed bug when adding records too fast
MacQSL May 16, 2024
6a800d0
fix: genericDateColDef input quirks
MacQSL May 17, 2024
801f14e
fix: genericDateColDef input quirks
MacQSL May 17, 2024
6856d13
Merge branch 'SIMSBIOHUB-572' of https://github.com/bcgov/biohubbc in…
MacQSL May 17, 2024
cedd924
docs: added missing docs to telemetryTableContext
MacQSL May 17, 2024
f7f49dc
feat: updated addRegsionToSurveyFromFeatures + slightly modified sear…
MacQSL May 17, 2024
9789a89
feat: Updated region-repository + region-service
MacQSL May 21, 2024
c13c7d4
fix: updated project data table headers + removed appended text from …
MacQSL May 21, 2024
8b28d63
feat: added additional service method for bcgw to find intersecting n…
MacQSL May 21, 2024
580f34e
test: updated tests for survey/region/bcgw services
MacQSL May 22, 2024
ef90373
test: updated tests for bcgw-layer / region / survey
MacQSL May 22, 2024
824e251
fix: resolved merge conflicts
MacQSL May 22, 2024
6d92740
doc: updated jsdocs
MacQSL May 22, 2024
8eb848b
test: updated tests for region/bcgw/survey services + repos
MacQSL May 22, 2024
8811e8c
docs: updated getIntersectingNrmRegionNamesFromFeatures documentation
MacQSL May 23, 2024
aa5bf17
fix: removed console.log
MacQSL May 23, 2024
e6abf31
fix: incorrect merge conflict accepted for telemetryTableContext
MacQSL May 23, 2024
a89d822
display regions are mui chip in project list data grid
mauberti-bc May 23, 2024
a95bd4c
wip: include surveys on project page
mauberti-bc May 24, 2024
a9fe82b
Merge branch 'dev' of github.com:bcgov/biohubbc into project-search
mauberti-bc May 24, 2024
83a6a75
debounce projet list request on input change
mauberti-bc May 25, 2024
f4e8446
project filters
mauberti-bc May 26, 2024
42a7606
admin-only project subtitle
mauberti-bc May 26, 2024
eb8d056
standard project title
mauberti-bc May 26, 2024
4f541e4
wip: list surveys for user id
mauberti-bc May 26, 2024
19b851c
observation list backend and ui
mauberti-bc May 27, 2024
b8f8c75
wip: list all animals on project page
mauberti-bc May 28, 2024
6621026
observation filters
mauberti-bc May 28, 2024
7fc41b5
move project, survey and observation list endpoints to user api
mauberti-bc May 30, 2024
dc53c09
list telemetry data available to user
mauberti-bc May 30, 2024
5c57da9
Merge branch 'observations-list' of github.com:bcgov/biohubbc into ob…
mauberti-bc May 30, 2024
f774aa2
add fields to animal table on project page
mauberti-bc May 31, 2024
f457272
consolidate code in observation-repository
mauberti-bc May 31, 2024
6cbcd4d
wip: put search params in the url
mauberti-bc May 31, 2024
f87e1a2
merge in dev
mauberti-bc May 31, 2024
2d23415
Merge branch 'dev' into project-page-data
mauberti-bc May 31, 2024
2c1fac1
broken: search params in url
mauberti-bc May 31, 2024
ab93dd1
Merge branch 'project-page-data' of github.com:bcgov/biohubbc into pr…
mauberti-bc May 31, 2024
28eefc4
Merge branch 'dev' into project-page-data
mauberti-bc Jun 4, 2024
95afcb3
Adjust file names.
NickPhura Jun 6, 2024
ca273db
Updates
NickPhura Jun 7, 2024
122c1ee
Rename
NickPhura Jun 7, 2024
d9a7538
Rename
NickPhura Jun 7, 2024
5ae326f
Fix table height
NickPhura Jun 10, 2024
4ffaf16
Fix tests
NickPhura Jun 11, 2024
f3ea1d9
WIP
NickPhura Jun 12, 2024
8dc1209
Fix infinite loop url params issue
NickPhura Jun 13, 2024
e3532bd
Merge remote-tracking branch 'origin/dev' into project-page-data
NickPhura Jun 13, 2024
ed1086d
Fix merge issues
NickPhura Jun 13, 2024
4b6eaff
Fixes
NickPhura Jun 14, 2024
1d7a11a
Project/survey filters working
NickPhura Jun 14, 2024
ceb8deb
Updates, add/fix tests
NickPhura Jun 17, 2024
866df46
WIP Telemetry
NickPhura Jun 18, 2024
b4fc8b2
Merge branch 'dev' into project-page-data
NickPhura Jun 18, 2024
4951a61
Merge branch 'project-page-data' of https://github.com/bcgov/biohubbc…
NickPhura Jun 18, 2024
5caa4f1
WIP Telemetry
NickPhura Jun 18, 2024
a56c006
WIP Telemetry/Critter
NickPhura Jun 18, 2024
743f979
Fix biohub taxonomy type
NickPhura Jun 19, 2024
008fa31
Telemetry Working (no pagination or filtering)
NickPhura Jun 20, 2024
f6382f4
Animal and Telemetry lists working
NickPhura Jun 20, 2024
98c3f21
Add tests
NickPhura Jun 20, 2024
a8c341b
Fixing url param logic, adding wrapper to await taxon loading, add tests
NickPhura Jun 20, 2024
1bfb117
Better species control
NickPhura Jun 20, 2024
7551ac2
search filters styling
mauberti-bc Jun 20, 2024
6c1fb2c
Fix SpeciesAutoComplete delete when providing default species
NickPhura Jun 21, 2024
71eb3d4
Merge branch 'project-page-data' of https://github.com/bcgov/biohubbc…
NickPhura Jun 21, 2024
a341d95
Merge remote-tracking branch 'origin/dev' into project-page-data
NickPhura Jun 22, 2024
d8394e5
FIx merge issues
NickPhura Jun 22, 2024
cba84cd
fix
NickPhura Jun 22, 2024
f07f2d2
Tweak project types
NickPhura Jun 24, 2024
c05849b
Merge remote-tracking branch 'origin/dev' into project-page-data
NickPhura Jun 25, 2024
c7d0596
Remove commented out code
NickPhura Jun 25, 2024
669a857
Fix code smells
NickPhura Jun 25, 2024
daf1410
Fix code smell
NickPhura Jun 25, 2024
eac14df
Merge branch 'dev' into project-page-data
NickPhura Jun 27, 2024
29137ea
Merge branch 'dev' into project-page-data
NickPhura Jun 28, 2024
3f1abd3
fix: updated misc colour objects
MacQSL Jul 2, 2024
ab1078a
fix: updated constants / getters for colours
MacQSL Jul 2, 2024
0116a7d
fix: updated typing for colourmaps
MacQSL Jul 3, 2024
271e934
Update jsdoc
NickPhura Jul 5, 2024
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
4 changes: 4 additions & 0 deletions api/src/__mocks__/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class MockReq {
params = {};
body = {};
files: any[] = [];
// Exists on authenticated requests. @see authentication.ts and authorization.ts
keycloak_token?: Record<string, any>;
// Exists on authenticated requests. @see authentication.ts and authorization.ts
system_user?: Record<string, any>;
}

export type ExtendedMockRes = MockRes & Response;
Expand Down
6 changes: 6 additions & 0 deletions api/src/models/animal-view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface IAnimalAdvancedFilters {
keyword?: string;
itis_tsns?: number[];
itis_tsn?: number;
system_user_id?: number;
}
2 changes: 1 addition & 1 deletion api/src/models/biohub-create.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { FeatureCollection } from 'geojson';
import { describe } from 'mocha';
import { ObservationRecord } from '../repositories/observation-repository';
import { ObservationRecord } from '../repositories/observation-repository/observation-repository';
import {
PostSurveyObservationToBiohubObject,
PostSurveySubmissionToBioHubObject,
Expand Down
2 changes: 1 addition & 1 deletion api/src/models/biohub-create.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FeatureCollection } from 'geojson';
import { ATTACHMENT_TYPE } from '../constants/attachments';
import { ISurveyAttachment, ISurveyReportAttachment } from '../repositories/attachment-repository';
import { ObservationRecord } from '../repositories/observation-repository';
import { ObservationRecord } from '../repositories/observation-repository/observation-repository';
import { getLogger } from '../utils/logger';
import { GetSurveyData, GetSurveyPurposeAndMethodologyData } from './survey-view';

Expand Down
11 changes: 11 additions & 0 deletions api/src/models/observation-view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface IObservationAdvancedFilters {
keyword?: string;
itis_tsns?: number[];
itis_tsn?: number;
start_date?: string;
end_date?: string;
start_time?: string;
end_time?: string;
min_count?: number;
system_user_id?: number;
}
14 changes: 10 additions & 4 deletions api/src/models/project-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { SystemUser } from '../repositories/user-repository';

export interface IProjectAdvancedFilters {
keyword?: string;
project_name?: string;
itis_tsn?: number;
itis_tsns?: number[];
system_user_id?: number;
project_name?: string;
}

export interface IGetProject {
Expand All @@ -25,13 +27,17 @@ export const ProjectData = z.object({

export type ProjectData = z.infer<typeof ProjectData>;

export const ProjectListData = z.object({
export const FindProjectsResponse = z.object({
project_id: z.number(),
name: z.string(),
regions: z.array(z.string())
start_date: z.string().nullable(),
end_date: z.string().nullable(),
regions: z.array(z.string()),
focal_species: z.array(z.number()),
types: z.array(z.number())
});

export type ProjectListData = z.infer<typeof ProjectListData>;
export type FindProjectsResponse = z.infer<typeof FindProjectsResponse>;

/**
* Pre-processes GET /projects/{id} objectives data
Expand Down
25 changes: 25 additions & 0 deletions api/src/models/survey-view.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Feature } from 'geojson';
import { z } from 'zod';
import { SurveyMetadataPublish } from '../repositories/history-publish-repository';
import { IPermitModel } from '../repositories/permit-repository';
import { SiteSelectionData } from '../repositories/site-selection-strategy-repository';
Expand All @@ -8,6 +9,30 @@ import { SurveyUser } from '../repositories/survey-participation-repository';
import { SystemUser } from '../repositories/user-repository';
import { ITaxonomy } from '../services/platform-service';

export interface ISurveyAdvancedFilters {
keyword?: string;
itis_tsn?: number;
itis_tsns?: number[];
start_date?: string;
end_date?: string;
survey_name?: string;
system_user_id?: number;
}

export const FindSurveysResponse = z.object({
project_id: z.number(),
survey_id: z.number(),
name: z.string(),
progress_id: z.number(),
regions: z.array(z.string()),
start_date: z.string().nullable(),
end_date: z.string().nullable().optional().nullable(),
focal_species: z.array(z.number().nullable()),
types: z.array(z.number().nullable())
});

export type FindSurveysResponse = z.infer<typeof FindSurveysResponse>;

export type SurveyObject = {
survey_details: GetSurveyData;
species: GetFocalSpeciesData & GetAncillarySpeciesData;
Expand Down
6 changes: 6 additions & 0 deletions api/src/models/telemetry-view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface ITelemetryAdvancedFilters {
keyword?: string;
itis_tsns?: number[];
itis_tsn?: number;
system_user_id?: number;
}
Loading