Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0cb4111
feat(thing/list): Add contacts to well
TylerAdamMartinez Apr 10, 2026
f2b044b
fix(contact/list): Fix broken link
TylerAdamMartinez Apr 10, 2026
3189606
Merge branch 'staging' into TAM-BDMS-690
TylerAdamMartinez Apr 10, 2026
f4690e4
fix(thing/list): Rm unused import
TylerAdamMartinez Apr 10, 2026
bf13b74
feat(ListPage): Impl client & server list page filtering
TylerAdamMartinez Apr 10, 2026
916e383
feat(ListPage): Improve UI layout
TylerAdamMartinez Apr 10, 2026
14b2d38
Merge pull request #242 from DataIntegrationGroup/TAM-BDMS-690
TylerAdamMartinez Apr 14, 2026
83719c7
Remove FieldEventHistoryAccordion component
jeremyzilar Apr 16, 2026
d328cd4
update types
jeremyzilar Apr 16, 2026
7da6d8b
Merge pull request #246 from DataIntegrationGroup/BDMS-190
jeremyzilar Apr 16, 2026
1bc1dc8
Move elevation info from Core Well Information to Physical Properties
jeremyzilar Apr 16, 2026
b540218
Reorganize well detail page cards and standardize inline text layout
jeremyzilar Apr 16, 2026
a529dca
Merge pull request #247 from DataIntegrationGroup/BDMS-708
jeremyzilar Apr 17, 2026
ddd15e2
update bug reporting copy
jeremyzilar Apr 20, 2026
ab15955
Update well details to use field_events API response shape
jeremyzilar Apr 20, 2026
2e9bb91
Wire RecentWaterLevelObservationsCard and WellPDFDownloadButton to fi…
jeremyzilar Apr 21, 2026
1d10c1f
chore(well-show): Rm unused import & clean up code fmt
TylerAdamMartinez Apr 14, 2026
e0aa857
Fix first visit staff using first_field_event API field
jeremyzilar Apr 21, 2026
5cd2236
feat(WellPhysicalProperties): Impl basic unit conversion toggle
TylerAdamMartinez Apr 21, 2026
374600e
refactor(config & constant): Mv configs & contants in WellShow compon…
TylerAdamMartinez Apr 21, 2026
28f7e2f
Refine Monitoring Info card layout and labels
jeremyzilar Apr 21, 2026
207cda2
fix(InlineRowWithUnitConversion): Add support for NaN inputs
TylerAdamMartinez Apr 21, 2026
71673b0
update types
jeremyzilar Apr 21, 2026
a8677fb
chore(utils/index): Add Unit utilies to utils folder index
TylerAdamMartinez Apr 21, 2026
3d2c60b
Fix well-show test mock for MonitoringInfoCard and field_events shape
jeremyzilar Apr 21, 2026
ba74e48
Guard getMeasuringDuration against invalid date strings
jeremyzilar Apr 21, 2026
8bd5342
Merge pull request #248 from DataIntegrationGroup/BDMS-721
jeremyzilar Apr 21, 2026
1775b44
Improve unit toggle button styling in WellPhysicalProperties
jeremyzilar Apr 21, 2026
6a0f97e
Restore ISample import removed by cleanup
jeremyzilar Apr 21, 2026
5632e3d
refactor(WellPhysicalProperties): Extract the default-unit logic into…
TylerAdamMartinez Apr 22, 2026
6939a3d
Merge pull request #244 from DataIntegrationGroup/TAM-BDMS-717
TylerAdamMartinez Apr 22, 2026
bfde27e
fix(WellPhysicalProperties): Add guard to normalize elevation to null…
TylerAdamMartinez Apr 22, 2026
6e880aa
Add Get Help button to global header
jeremyzilar Apr 22, 2026
1d4303a
Show organization, phone type, and address type in ContactsCard
jeremyzilar Apr 22, 2026
0295af7
Merge pull request #252 from DataIntegrationGroup/BDMS-704
jeremyzilar Apr 22, 2026
98c9cf6
feat(RecentWaterLevelObservations): Disable table selection & left al…
TylerAdamMartinez Apr 23, 2026
2c0b5db
fix(well-show): Filter out null observations so they don't show up on…
TylerAdamMartinez Apr 23, 2026
3a2f14c
Merge pull request #251 from DataIntegrationGroup/report-bug-button
jeremyzilar Apr 23, 2026
1f77a81
Hide home test-site banner when VITE_APP_ENV is production
jeremyzilar Apr 23, 2026
80b12d4
Merge pull request #254 from DataIntegrationGroup/BDMS-757
jeremyzilar Apr 23, 2026
e6630bb
Merge pull request #253 from DataIntegrationGroup/TAM-BDMS-700
TylerAdamMartinez Apr 24, 2026
2374fa8
Merge pull request #250 from DataIntegrationGroup/TAM-BDMS-719
TylerAdamMartinez Apr 24, 2026
1c3f943
fix(utils/accessControl): Lowered the permissions needed to view fiel…
TylerAdamMartinez Apr 24, 2026
a30404a
fix(RecentWaterLevelObservations): Update flatmap logic to get all th…
TylerAdamMartinez Apr 24, 2026
9267c5f
fix(src): patch IObservation type across the well show
TylerAdamMartinez Apr 24, 2026
0137570
chore(test/utils/accessControl): Update tests to match new logic
TylerAdamMartinez Apr 24, 2026
6f6589d
fix(utils/accessControl): Add contact list & show to viewer group per…
TylerAdamMartinez Apr 24, 2026
3a265d3
Merge pull request #255 from DataIntegrationGroup/TAM-BDMS-720
TylerAdamMartinez Apr 24, 2026
e9674f6
update ocotillo.lexicon to adminRoles
jeremyzilar Apr 24, 2026
4bb6e44
Fix access control tests for admin-only lexicon list and show
jeremyzilar Apr 24, 2026
b84ba42
Merge pull request #256 from DataIntegrationGroup/update-access-controls
jeremyzilar Apr 24, 2026
3201e5c
fix(accessControl): Account for name mismatch
TylerAdamMartinez Apr 24, 2026
06c99d1
chore(sider): Update things that could lead to a bug
TylerAdamMartinez Apr 24, 2026
78c2c7b
chore(sider): Add new abstract here too
TylerAdamMartinez Apr 24, 2026
8892e0e
Merge branch 'staging' into BDMS-744
jeremyzilar Apr 24, 2026
b326e2d
update email address to ocotillo-nmbg@nmt.edu
jeremyzilar Apr 24, 2026
fffe711
Stop mutating measuring_notes on each render in recent water level card.
jeremyzilar Apr 24, 2026
29e319e
Use stable empty array references for well detail fallbacks.
jeremyzilar Apr 24, 2026
49e19f2
Improve well attachments grid and file table.
jeremyzilar Apr 24, 2026
62bf5e8
Reduce Equipment DataGrid loading overlay flicker on well detail.
jeremyzilar Apr 24, 2026
26790bc
Point Prism mock servers at committed openapi-auth.json.
jeremyzilar Apr 27, 2026
bd2ff3d
Refresh OpenAPI spec from staging and align codegen with Prism.
jeremyzilar Apr 27, 2026
58f409c
Merge pull request #258 from DataIntegrationGroup/BDMS-744
jeremyzilar Apr 27, 2026
a38cd37
Merge pull request #259 from DataIntegrationGroup/BDMS-762
jeremyzilar Apr 27, 2026
10a7a0f
Fix hydrograph showing previous well after client-side navigation
jeremyzilar Apr 27, 2026
3fa8df7
Well list: use name_contains for toolbar search and clarify labels
jeremyzilar Apr 27, 2026
228da69
Merge pull request #257 from DataIntegrationGroup/TAM-update-lock
TylerAdamMartinez Apr 27, 2026
1ac82cd
Merge pull request #260 from DataIntegrationGroup/BDMS-763
jeremyzilar Apr 27, 2026
3aa4fd3
Merge pull request #262 from DataIntegrationGroup/BDMS-773
jeremyzilar Apr 27, 2026
c3f4487
feat(map): filter features by selection polygons and update dependenc…
jirhiker Apr 27, 2026
fbb2a6f
Merge pull request #263 from DataIntegrationGroup/BDMS-774
jeremyzilar Apr 27, 2026
85aec54
fix(map): update selection features to use selectionPolygons for impr…
jirhiker Apr 27, 2026
173af80
Merge pull request #265 from DataIntegrationGroup/BDMS-778-Lasso-poly…
jirhiker Apr 27, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

.idea
.cursor
.env

# dependencies
Expand Down
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,23 @@ VITE_AUTHENTIK_REDIRECT_URI="https://your-athentik-redirect"

## Scripts/Commands - Mock Servers, Testing, Type/Zod Generation

- `npm run mock:server:vitest`: Runs a Prism mock server to run the vitest test suite.
- `npm run mock:server:cypress`: Runs a Prism mock server to run the cypress test suite.
- `npm run mock:server:vitest`: Runs a Prism mock server to run the vitest test suite. Uses the committed `openapi-auth.json` in the repo root (no network fetch for startup).
- `npm run mock:server:cypress`: Runs a Prism mock server to run the cypress test suite. Same spec file as vitest.
- `npm run test:run`: Runs the Vitest test suite a single time.
- `npx cypress open`: Opens the Cypress browser to run and interact with Cypress tests.
- `npx cypress run`: Runs the Cypress test suite in headless mode a single time.
- `npm run openapi:generate`: Runs hey-api typescript generation for types and zod schemas in `/generated`
- `npm run openapi:generate`: Runs hey-api TypeScript and Zod generation using `./openapi-auth.json` into `src/generated`.

## Refreshing the OpenAPI spec

Prism mocks and codegen both use **`openapi-auth.json`** at the repo root. When the staging API adds or changes schemas, refresh the file from staging and regenerate so contract tests and `zWellResponse` validation stay aligned:

```bash
curl -fsSL "https://ocotillo-api-staging.newmexicowaterdata.org/openapi-auth.json" -o openapi-auth.json
npm run openapi:generate
```

Then run tests and commit `openapi-auth.json` plus `src/generated/` updates as needed.

## Running the Vitest Test Suite

Expand Down Expand Up @@ -150,14 +161,15 @@ npx cypress run

## Tests in CI and Openapi-TS Generation

Both the Vitest and Cypress test suites run via a Github action on PR. The Vitest contract tests may fail because of changes to the Ocotillo API if you have not recently run the test suite locally.
In the case of failing contract tests, you'll have to make sure your types and zod schemas are up to date with the openapi.json spec by:
Both the Vitest and Cypress test suites run via a Github action on PR. The Vitest contract tests may fail when the committed **`openapi-auth.json`** is older than the API schemas your Zod types expect.

When the API changes, refresh **`openapi-auth.json`** from staging (see **Refreshing the OpenAPI spec** above), run:

- Running the opnenapi-ts generation from the Ocotillo Staging API `openapi.json` spec:
```bash
npm run openapi:generate
```
- Fixing any failing tests and related code

Fix any failing tests and related code, then commit `openapi-auth.json` and `src/generated/` together with your changes.

## Building and Serving Production Build

Expand Down
2 changes: 1 addition & 1 deletion openapi-auth.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion openapi-ts.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from '@hey-api/openapi-ts'

export default defineConfig({
input: 'https://ocotillo-api-staging.newmexicowaterdata.org/openapi-auth.json',
input: './openapi-auth.json',
output: {path: './src/generated', clean: true},
plugins: [
{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"typecheck": "tsc",
"mock:server:vitest": "prism mock https://ocotillo-api-staging.newmexicowaterdata.org/openapi-auth.json --dynamic=false --port 4010",
"mock:server:cypress": "prism mock https://ocotillo-api-staging.newmexicowaterdata.org/openapi-auth.json --dynamic=true --port 4010 --seed 12345",
"mock:server:vitest": "prism mock openapi-auth.json --dynamic=false --port 4010",
"mock:server:cypress": "prism mock openapi-auth.json --dynamic=true --port 4010 --seed 12345",
"openapi:generate": "npx @hey-api/openapi-ts"
},
"browserslist": {
Expand Down
2 changes: 1 addition & 1 deletion public/content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ One of the things the process revealed was that data sharing problems exist with

## Questions or feedback?

Use the [Report a Bug](/report-a-bug) page to submit issues or suggestions, or reach out to the Data Services team at [newmexicowaterdata@nmt.edu](mailto:newmexicowaterdata@nmt.edu).
Use the [Report a Bug](/report-a-bug) page to submit issues or suggestions, or reach out to the Data Services team at [ocotillo-nmbg@nmt.edu](mailto:ocotillo-nmbg@nmt.edu).
6 changes: 3 additions & 3 deletions public/content/report-a-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ deck: Found something broken or have a suggestion? Let us know.

## How to report an issue

If you've encountered an error, unexpected behavior, or have a suggestion for improvement, please submit an issue through one of the channels below.
If you've encountered an error, unexpected behavior, or have a suggestion for improvement, we want to know about it! Your feedback is essential to help us improve Ocotillo. Please email us with bug reports or feature requests at [ocotillo-nmbg@nmt.edu](mailto:ocotillo-nmbg@nmt.edu).

## What to include

Expand All @@ -15,8 +15,8 @@ A good bug report includes:
- **What actually happened**
- **Steps to reproduce** -- the more specific the better
- **Browser and operating system** (e.g. Chrome on macOS)
- **Screenshots** if the issue is visual
- **Screenshots are extremely helpful** if the issue is visual

## Contact

For urgent issues or questions, reach out directly to the development team at [newmexicowaterdata@nmt.edu](mailto:newmexicowaterdata@nmt.edu).
For urgent issues or questions, reach out directly to the development team at [ocotillo-nmbg@nmt.edu](mailto:ocotillo-nmbg@nmt.edu).
43 changes: 43 additions & 0 deletions src/components/Button/ReportBugButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Button } from '@mui/material'
import { BugReportOutlined } from '@mui/icons-material'
import { buildBugReportUrl } from '@/utils'

interface ReportBugButtonProps {
user?: {
name?: string
email?: string
}
}

export const ReportBugButton = ({ user }: ReportBugButtonProps) => {
const handleClick = () => {
const url = buildBugReportUrl({
userName: user?.name,
userEmail: user?.email,
})
window.open(url, '_blank', 'noopener,noreferrer')
}

return (
<Button
onClick={handleClick}
size="small"
variant="text"
startIcon={<BugReportOutlined sx={{ fontSize: '0.9rem !important', mr: -0.5 }} />}
aria-label="Get help / report a bug"
sx={{
textTransform: 'none',
color: 'text.secondary',
fontSize: '0.8rem',
fontWeight: 400,
minWidth: 0,
px: 1.5,
borderRadius: 999,
whiteSpace: 'nowrap',
'&:hover': { color: 'text.primary', bgcolor: 'action.hover' },
}}
>
Get Help
</Button>
)
}
2 changes: 1 addition & 1 deletion src/components/Button/WellPDFDownload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const WellPDFDownloadButton = ({
}: {
well: IWell
isLoading: boolean
observations: readonly Partial<IObservation>[]
observations: readonly Partial<Omit<IObservation, 'created_at'>>[]
assets: BaseRecord[]
contacts: IContact[]
sample?: Partial<ISample>
Expand Down
1 change: 1 addition & 0 deletions src/components/Button/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './ReportBugButton'
export * from './WellPDFPreview'
export * from './WellPDFDownload'
Loading
Loading