Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
298 commits
Select commit Hold shift + click to select a range
7a6e8ed
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Jul 23, 2025
6eccbe3
created UI for day overview page and create day modal
minhtriet359 Jul 23, 2025
f13fa05
Merge remote-tracking branch 'backend/taliaBranch' into triet_overvie…
minhtriet359 Jul 23, 2025
745c094
fixed db fail build error
tfrendl Jul 23, 2025
70f0da5
hooked up day to backend
minhtriet359 Jul 23, 2025
24abf08
added check to make sure days cannot have the same name
minhtriet359 Jul 23, 2025
da3e438
hooked conversion create modal - need to connect pattern
minhtriet359 Jul 24, 2025
7fba152
Merge remote-tracking branch 'origin/evan-carey/weeks-api' into Triet…
minhtriet359 Jul 24, 2025
69c2ebb
fix merge errors
minhtriet359 Jul 24, 2025
7bb4599
hooked up create conversion to backend
minhtriet359 Jul 24, 2025
f09b4c7
corrected insertData to insert into conversions and conversion segments
tfrendl Jul 24, 2025
d3f5dab
made order of methods in models consistent
tfrendl Jul 24, 2025
e9bdc07
revert changes to git.ignore and docker-compose.yml
minhtriet359 Jul 24, 2025
24020a5
middleware for admin authentication
tfrendl Jul 24, 2025
2db8158
consistent success messages from routes
tfrendl Jul 24, 2025
cdd8fc4
routes check id is an integer, updated validConversionSegments in con…
tfrendl Jul 24, 2025
91d3d23
Merge timeVaryingConversion into edit-conversions: resolved translati…
PRINCESANCHEZ Jul 24, 2025
d83c9ad
start->startTime
tfrendl Jul 24, 2025
f9a9f93
day_name -> name
tfrendl Jul 24, 2025
cdec8e0
Merge Talia’s taliaBranch into edit-conversions after resolving confl…
PRINCESANCHEZ Jul 25, 2025
f2ec3f8
order conversion segments by start time
tfrendl Jul 25, 2025
850c96d
removed start and end time
tfrendl Jul 25, 2025
e47ed45
multi-value requests sent as post route instead of get
tfrendl Jul 25, 2025
c2e769e
indentation spaces -> tabs
tfrendl Jul 25, 2025
89dec2f
removed date-time type requirement, as it wouldn't accept -infinity/i…
tfrendl Jul 25, 2025
83d8d78
delete also requires end time
tfrendl Jul 25, 2025
ee67bf6
start time and end time cannot be null
tfrendl Jul 25, 2025
4182304
delete conversion segment requires end time
tfrendl Jul 25, 2025
7f8bc9b
edit requires name
tfrendl Jul 25, 2025
72f8fde
require not null values for edit route, delete route only takes id
tfrendl Jul 25, 2025
6424e32
edit requires all not null values
tfrendl Jul 25, 2025
92bd352
undo formatting changes to docker-compose
evan-carey Jul 26, 2025
109fd51
undo formatting change to docker-compose
evan-carey Jul 26, 2025
026b882
Address code review comments for Weeks feature
evan-carey Jul 26, 2025
22ee2c1
Revert docker-compose.yml to match development branch
evan-carey Jul 26, 2025
c089e38
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Jul 27, 2025
a66561b
Add files via upload
Gomez-V Jul 27, 2025
86ed698
verifyConversion check -> todo
tfrendl Jul 28, 2025
d391acb
conversion segment requires endTime for delete and for retrieving a s…
tfrendl Jul 28, 2025
ee8a919
handle timestamp/text datatype conversions between sql and javascript
tfrendl Jul 28, 2025
89cb736
updated insert day segment that updates overlapping segments - commen…
tfrendl Jul 28, 2025
3f55c76
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Jul 28, 2025
c3a6cdb
fix(weeks): WeeksDetailComponent does not need a loading spinner
evan-carey Jul 29, 2025
16e9ee7
Edit Pattern Components
Gomez-V Jul 29, 2025
336f928
Add conversionSegments Redux API and implement split segment logic
PRINCESANCHEZ Jul 29, 2025
d441a89
Merge branch 'evan-carey/weeks-api' into evan-carey/days-edit
evan-carey Jul 30, 2025
00fa5aa
Merge remote-tracking branch 'origin/edit-conversions' into evan-care…
evan-carey Jul 30, 2025
9986a57
added comment regarding cascade in day_segments
tfrendl Jul 30, 2025
0e79628
[wip] Edit Day feature
evan-carey Jul 30, 2025
edeecf7
conn.oneOrNone -> conn.one
tfrendl Jul 30, 2025
972b2c4
throw error -> try/catch, log.error
tfrendl Jul 30, 2025
669c841
verify time coverage conversion segments and re-cast start_time in db…
tfrendl Jul 30, 2025
eb63051
rolled back time span check in route to move to model
tfrendl Jul 30, 2025
4b4712f
move ConversionSegmentData interface to separate file for modularity
PRINCESANCHEZ Jul 30, 2025
c595d12
feat(days): Edit Day feature
evan-carey Jul 31, 2025
cc74833
chore: dead code and comments cleanup
evan-carey Jul 31, 2025
c9d87fc
Merge pull request #1 from oed-csumb-su25/evan-carey/weeks-api
evan-carey Jul 31, 2025
cab42e6
verify full time coverage when editing day and conversion segments
tfrendl Jul 31, 2025
92dfe3a
cleanup modal state, add multi-field error handling, update API endpo…
PRINCESANCHEZ Jul 31, 2025
a0c56ed
passed all postman api endpoint testing
tfrendl Jul 31, 2025
74329bc
updated comments
tfrendl Jul 31, 2025
ca8f960
Merge remote-tracking branch 'oed-backend/taliaBranch' into evan-care…
evan-carey Aug 1, 2025
3ae7ab7
Add delete logic + i18n for field errors
PRINCESANCHEZ Aug 1, 2025
e5c3dc3
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Aug 1, 2025
4ff9c5a
import failure
tfrendl Aug 1, 2025
c1a59c2
corrected [] to {} in sql files
tfrendl Aug 1, 2025
7d0b7fc
added param descriptions and updated error message handling in routes
tfrendl Aug 1, 2025
3adb6d2
safer way for validating id in routes, format for response
tfrendl Aug 1, 2025
214ebcf
return validation error message for all route functions
tfrendl Aug 1, 2025
77f5d34
removed try/catch around update segment .sql calls
tfrendl Aug 1, 2025
61ab22a
added checks for segment tables that start < end
tfrendl Aug 1, 2025
8122f99
implemented moment for conversion segment
tfrendl Aug 1, 2025
b1030aa
updates for moment() in conversion segment
tfrendl Aug 1, 2025
51da7ae
cleaned up unecessary try/catch
tfrendl Aug 1, 2025
9180c06
feat: implement internationalization for day editing and segment spli…
Gomez-V Aug 1, 2025
e83f7e1
Merge branch 'backend/taliaBranch' into Triet/backend_integration
minhtriet359 Aug 1, 2025
fbbd313
Merge branch 'timeVaryingConversion' into Triet/backend_integration
minhtriet359 Aug 1, 2025
38f58cf
fixed handling infinity values
tfrendl Aug 1, 2025
fcdee3d
unique check on day segments table
tfrendl Aug 1, 2025
8366376
updated /add to /addComponentName
tfrendl Aug 1, 2025
92ddc02
updated /add to /addComponentName
tfrendl Aug 1, 2025
c1bebba
changed dayName to name
minhtriet359 Aug 2, 2025
9059525
Merge branch 'backend/taliaBranch' into Triet/backend_integration
minhtriet359 Aug 2, 2025
065abeb
feat(days): ability to edit day segment hours
evan-carey Aug 2, 2025
260c1dc
Merge branch 'evan-carey/days-edit' of https://github.com/oed-csumb-s…
evan-carey Aug 2, 2025
fb414b8
Merge remote-tracking branch 'oed-backend/taliaBranch' into evan-care…
evan-carey Aug 2, 2025
5e667fb
update endpoints to match server; fix bad file path on server
evan-carey Aug 2, 2025
692be81
changed all daily patterns to days
minhtriet359 Aug 2, 2025
0b2329c
fixed space indetations
minhtriet359 Aug 2, 2025
d7f33a6
Clean up EditConversionModal: fix delete edge cases, error handling, …
PRINCESANCHEZ Aug 2, 2025
357f291
removed file directory
tfrendl Aug 2, 2025
c927ace
added French and Spanish translations for daily.patterns
Gomez-V Aug 3, 2025
2a190d4
made necessary naming and logic adjustments per reivew
minhtriet359 Aug 3, 2025
1e0b033
Fix datetime handling, split logic, and styling in Edit Conversion modal
PRINCESANCHEZ Aug 3, 2025
b5ac72d
Merge branch 'evan-carey/days-edit' into Triet/backend_integration
minhtriet359 Aug 3, 2025
ef3ada3
converted daily.patterns to days
minhtriet359 Aug 3, 2025
a65656c
create conversion only show warning when no pattern
minhtriet359 Aug 3, 2025
60ac3b3
Merge remote-tracking branch 'origin/Triet/backend_integration' into …
PRINCESANCHEZ Aug 3, 2025
8460566
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Aug 3, 2025
3f4b2a4
Refactor EditConversionModal: separate segment save, centralize <hr> …
PRINCESANCHEZ Aug 3, 2025
ae66225
Refactor conversionSegmentsApi: clean up tags, remove transformRespon…
PRINCESANCHEZ Aug 3, 2025
8f4138e
fixed valid tags for page reload when edit day, added notification fo…
minhtriet359 Aug 3, 2025
3130482
fixed route mismatch for conversionSegment
minhtriet359 Aug 3, 2025
c672193
Merge remote-tracking branch 'origin/Triet/backend_integration' into …
PRINCESANCHEZ Aug 3, 2025
1c755ea
Add leading slash to sourceDestination URL and license header to conv…
PRINCESANCHEZ Aug 3, 2025
0e12b72
fixed splitting conversion not working
minhtriet359 Aug 4, 2025
f2c001c
Fix segment save validation and add -99 handling for No Pattern option
PRINCESANCHEZ Aug 4, 2025
5fb4d76
removed extra spaces and converted indentations to tab
tfrendl Aug 4, 2025
628783d
refactor: remove unnecessary sorting from Edit and Delete segment han…
PRINCESANCHEZ Aug 4, 2025
94d9442
added migrations and updated week_patterns week_name -> name
tfrendl Aug 4, 2025
76ec31b
Refactor: Add interface for editing conversion segments with original…
PRINCESANCHEZ Aug 4, 2025
b9c6cf3
add order for creating new and altered tables
tfrendl Aug 4, 2025
90dd52d
weekName -> name
tfrendl Aug 4, 2025
8e4e37b
weekName -> name
tfrendl Aug 5, 2025
67d6b5b
fix(days): missing translation; broken paging in segments table; cac…
evan-carey Aug 5, 2025
dd34818
fix: lint errors
evan-carey Aug 5, 2025
d147c61
delete after and earlier for segments
tfrendl Aug 5, 2025
6bd4066
Merge remote-tracking branch 'oed-backend/taliaBranch' into evan-care…
evan-carey Aug 5, 2025
abf05d7
refactor(weeks): change Week property `weekName` to `name` to match b…
evan-carey Aug 5, 2025
aa38136
after -> later
tfrendl Aug 5, 2025
b325d6c
removed commented out code from conversions table
tfrendl Aug 5, 2025
13d6c8d
migrations: insert conversions into conversion_segments
tfrendl Aug 5, 2025
13d2c82
updated error
tfrendl Aug 5, 2025
ab5fcb0
Fix error handling for split and edit segment fields
PRINCESANCHEZ Aug 5, 2025
dbcc9a2
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Aug 5, 2025
2999591
do not allow deleteEarlier for 0/-inf, do not allow deleteLater for 2…
tfrendl Aug 5, 2025
7a5b9fe
Implement split and delete functionality for time-varying conversion …
PRINCESANCHEZ Aug 5, 2025
a03c8a5
delete later and delete earlier passed API endpoint testing
tfrendl Aug 5, 2025
6ed174f
Merge remote-tracking branch 'talia/taliaBranch' into edit-conversions
PRINCESANCHEZ Aug 5, 2025
ca8bf34
replaced create_reading_views.sql with version from OpenEnergyDashboa…
tfrendl Aug 5, 2025
2c8650f
replaced create_cik_table.sql with version from OpenEnergyDashboard/d…
tfrendl Aug 5, 2025
cc71165
added missing header
tfrendl Aug 5, 2025
0ce95f0
reverted update from previous team documentation
tfrendl Aug 5, 2025
1ed9ff7
Merge remote-tracking branch 'oed-backend/taliaBranch' into evan-care…
evan-carey Aug 6, 2025
2e54383
fix(days): SQL script params don't match model for deleting and updat…
evan-carey Aug 6, 2025
22c2fca
refactor(days): update front-end day segments API to match backend
evan-carey Aug 6, 2025
8dd1336
Merge remote-tracking branch 'origin/edit-conversions' into evan-care…
evan-carey Aug 6, 2025
1ad4b91
feat(days): resolve code review comments
evan-carey Aug 6, 2025
4151fbc
Merge pull request #2 from oed-csumb-su25/evan-carey/days-code-review
evan-carey Aug 6, 2025
025aa96
remove current frontend team's changes
tfrendl Aug 6, 2025
320340f
removed two spacing changes
tfrendl Aug 6, 2025
f122842
revert docker-compose changes
minhtriet359 Aug 6, 2025
64fc4b5
resolved minor spacing and styling change requests
tfrendl Aug 7, 2025
7ecb474
day segment delete earlier and delete later include dayId
tfrendl Aug 7, 2025
a147fa8
day segment delete requires dayId instead of id
tfrendl Aug 7, 2025
06da585
removed get all functionality for conversion segments
tfrendl Aug 7, 2025
25da8b9
removed get all functionality for day segments
tfrendl Aug 7, 2025
4d01ca7
conversionSegment transactions route -> model
tfrendl Aug 7, 2025
c4295e8
day segment transaction route -> model
tfrendl Aug 7, 2025
e1e635e
days transaction route -> model
tfrendl Aug 7, 2025
dd339a7
removed unecessary transaction
tfrendl Aug 7, 2025
f50c122
day segment update checks to see if it was start or end that changed
tfrendl Aug 7, 2025
d3f476c
moved reused function to a new util file
tfrendl Aug 7, 2025
8553592
removed unecessary ::TIMESTAMP casting in SQL files
tfrendl Aug 7, 2025
f472b9f
added comments about casting, removed unecessary casting
tfrendl Aug 7, 2025
08f99b0
removed extra try/catch
tfrendl Aug 7, 2025
21a75c0
removed unecessary SQL file
tfrendl Aug 7, 2025
a379f72
Merge branch 'development' into development
minhtriet359 Aug 7, 2025
cb4f6e1
Merge pull request #4 from oed-csumb-su25/development
minhtriet359 Aug 7, 2025
b12aed7
Merge branch 'development' into evan-carey/days-edit
minhtriet359 Aug 7, 2025
a29dee8
splitEarlier for conversion segments
tfrendl Aug 8, 2025
36381ca
splitEarlier for conversion segments
tfrendl Aug 8, 2025
1adb9ee
splitLater for conversion segments
tfrendl Aug 8, 2025
0d912ce
splitEarlier for day segments
tfrendl Aug 8, 2025
ccc8477
splitLater for day segments
tfrendl Aug 8, 2025
50e6250
insert model for day segment requires spanning from 0-24
tfrendl Aug 8, 2025
7045cbb
insert model for conversion segments only allowed -infinity to infinity
tfrendl Aug 8, 2025
7a4030d
conversion segment split earlier passed testing
tfrendl Aug 8, 2025
1743785
conversion segment split later passed testing
tfrendl Aug 8, 2025
72c3861
updated spacing and comments
tfrendl Aug 8, 2025
4a31ee8
cannot insert -infinity to infinity conversion segment if segs alread…
tfrendl Aug 8, 2025
f0a2f6f
splitEarlier day segment passed tests
tfrendl Aug 8, 2025
a75c85f
split later day segment passed tests
tfrendl Aug 8, 2025
7ec2df5
number -> integer where relevant
tfrendl Aug 8, 2025
0858d73
Merge remote-tracking branch 'oed-backend/taliaBranch' into evan-care…
evan-carey Aug 9, 2025
e9090ef
Fix typo in comment from segmentsApi to conversionSegmentsApi
PRINCESANCHEZ Aug 9, 2025
265f38f
fix(translations): remove non-translated symbols and restore colon wi…
PRINCESANCHEZ Aug 9, 2025
0293082
chore: revert changes to .gitignore and docker-compose
evan-carey Aug 9, 2025
484df8f
Merge pull request #5 from oed-csumb-su25:evan-carey/code-review
evan-carey Aug 9, 2025
96593d9
fix(weeks): address code review comments for CreateWeekModal
evan-carey Aug 9, 2025
8bc0661
fix(weeks): address code review comments for EditWeekModalComponent
evan-carey Aug 9, 2025
615b09b
fix(days): address some code review comments for DeleteDaySegment
evan-carey Aug 9, 2025
29dacf9
Refactor: remove null from weekPatternsId, add blank line, localize P…
PRINCESANCHEZ Aug 9, 2025
70953de
fix(days): address code review comments for EditDayModal
evan-carey Aug 9, 2025
dc39352
fix(conversions): a11y - add aria-label to truncated segment note cell
evan-carey Aug 9, 2025
fc4b4d9
refactor: remove ModalHeader toggle from Week and Day modals
evan-carey Aug 9, 2025
7ac9e14
style(days): center note modal on EditDayModal component
evan-carey Aug 10, 2025
d83956d
fix(days): change EditDaySegment validation according to code review
evan-carey Aug 10, 2025
ae8a7d2
feat(days): move day segment split logic to back-end
evan-carey Aug 10, 2025
f7a4991
refactor(days): use Day types for days API
evan-carey Aug 10, 2025
6d80b33
Merge pull request #6 from oed-csumb-su25/evan-carey/code-review
evan-carey Aug 10, 2025
5257b57
fix(header): route should be lowercase
evan-carey Aug 10, 2025
54ad9cf
fix(days): don't need to check if name exists when sorting days
evan-carey Aug 10, 2025
44c1ff5
fix(days): error messages shouldn't say "Please try again"
evan-carey Aug 10, 2025
b9fcd65
Merge pull request #7 from oed-csumb-su25/evan-carey/code-review
evan-carey Aug 10, 2025
174ee41
refactor: reuse "intercept" and "edit" keys from translation file
evan-carey Aug 10, 2025
69685dd
refactor: reuse "slope" translation key for conversion and day views
evan-carey Aug 10, 2025
870f074
fix(days): remove commented out code
evan-carey Aug 10, 2025
b9b3f96
Merge pull request #8 from oed-csumb-su25/evan-carey/code-review
evan-carey Aug 10, 2025
445ebdc
Refactor unnecessary styling for edit conversion modal
PRINCESANCHEZ Aug 10, 2025
ea763de
refactor: use the `useTranslate` hook in components instead of the `t…
evan-carey Aug 10, 2025
9629d4a
fix(redux/api): remove unused tag type
evan-carey Aug 10, 2025
7abdd8a
Merge pull request #9 from oed-csumb-su25/evan-carey/code-review
evan-carey Aug 10, 2025
b96ee3a
Remove refetchSegments call and simplify error notification arguments
PRINCESANCHEZ Aug 10, 2025
6df9272
Implement splitEarlier and splitLater routes, and handle -99 weekPatt…
PRINCESANCHEZ Aug 11, 2025
4eb5f9c
Add success notification and unwrap() for split/delete segment actions
PRINCESANCHEZ Aug 11, 2025
b19c9b2
Replaced intl.formatMessage with translate() for static strings witho…
PRINCESANCHEZ Aug 11, 2025
7d6afb5
Fix neutral segment warning flow and backend constraint error on dele…
PRINCESANCHEZ Aug 11, 2025
2cc09b7
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Aug 11, 2025
005cfcc
Make delete buttons hidden instead of disabled
PRINCESANCHEZ Aug 11, 2025
75b4c62
addressed required changes for conversions.ts and CreateConversionModal
minhtriet359 Aug 11, 2025
5914dfc
Merge branch 'evan-carey/days-edit' of https://github.com/oed-csumb-s…
minhtriet359 Aug 11, 2025
9d67c8b
Enable editing slope, intercept, pattern, and note when splitting con…
PRINCESANCHEZ Aug 12, 2025
1360183
Enable editing slope, intercept, pattern, and note when splitting con…
PRINCESANCHEZ Aug 12, 2025
87b3e5c
made required changes for addConversion and addDay modals
minhtriet359 Aug 12, 2025
f363755
Merge branch 'evan-carey/days-edit' of https://github.com/oed-csumb-s…
minhtriet359 Aug 12, 2025
2288a2c
Merge remote-tracking branch 'origin/evan-carey/days-edit' into edit-…
PRINCESANCHEZ Aug 13, 2025
e0dd651
Refactor EditConversionModalComponent with child components; update s…
PRINCESANCHEZ Aug 13, 2025
62a1c51
Add comment for SplitConversionSegmentPayload and fix minor indentation
PRINCESANCHEZ Aug 13, 2025
613942c
remove hardcoded string and remove minimum constraint to support -99 …
PRINCESANCHEZ Aug 13, 2025
003bce9
Centralize css styling and update translation strings
PRINCESANCHEZ Aug 14, 2025
81eed88
feat(days): show success message on splitting day segment
evan-carey Aug 14, 2025
cc25461
feat(days): show success notification on deleting a day segment
evan-carey Aug 14, 2025
8c6686c
fix(translations): "Segments Table" -> "Day Segments Table"
evan-carey Aug 14, 2025
0a0c91c
fix(translations): "week.delete.confirm" missing Spanish translation
evan-carey Aug 14, 2025
459465b
simplify handleSourceIdChange/handleDestinationIdChange and set defau…
minhtriet359 Aug 14, 2025
2babc47
Shorten reactstrap import and add modal divider in Days Edit
PRINCESANCHEZ Sep 8, 2025
5a6d6c8
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 8, 2025
d1dae3a
fix: Remove unused warning modal state when closing delete segment modal
PRINCESANCHEZ Sep 8, 2025
685b5e9
Add validation to prevent split times outside segment range
PRINCESANCHEZ Sep 8, 2025
cb80349
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 8, 2025
82fe7f7
Align modal table row count with other tables (20 rows)
PRINCESANCHEZ Sep 8, 2025
3c8cf92
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 8, 2025
52252c6
add default row count constant for consistent pagination across table…
PRINCESANCHEZ Sep 8, 2025
ac109a5
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 8, 2025
ad1b59e
Update split flow to match day behavior
PRINCESANCHEZ Sep 8, 2025
0102914
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 8, 2025
c8c849a
Allow editing segment start/end with neighbor auto-update and validation
PRINCESANCHEZ Sep 11, 2025
612799c
refactor: improve datetime validation, clear errors on input, remove …
PRINCESANCHEZ Sep 11, 2025
bfaf3cd
disable save when unchanged and add success/error notifications
PRINCESANCHEZ Sep 12, 2025
615b227
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 12, 2025
c5ecc50
remove unused exports
PRINCESANCHEZ Sep 12, 2025
2da5d3f
Merge branch 'edit-conversions' into evan-carey/days-edit
PRINCESANCHEZ Sep 12, 2025
576c2ae
remove edit conversion warning
huss Sep 12, 2025
26e7e0a
commenting change to address PR comment
huss Sep 12, 2025
b8ef6b5
Add error handling with showErrorNotification for neighbor segment au…
PRINCESANCHEZ Sep 12, 2025
c61046b
Update split time placeholder to use complete and move to translations
PRINCESANCHEZ Sep 12, 2025
692ed35
add comments to explain git add . usage for invalid props
PRINCESANCHEZ Sep 12, 2025
e2dd45f
Use .then/.catch for neighbor segment adjustments
PRINCESANCHEZ Sep 13, 2025
94b223b
update pattern dropdown to use translation string for no pattern
PRINCESANCHEZ Sep 14, 2025
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
24 changes: 21 additions & 3 deletions src/client/app/components/HeaderButtonsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import TooltipHelpComponent from '../components/TooltipHelpComponent';
import { clearGraphHistory } from '../redux/actions/extraActions';
import { authApi } from '../redux/api/authApi';
import { selectOEDVersion } from '../redux/api/versionApi';
import { useTranslate } from '../redux/componentHooks';
import { useAppDispatch, useAppSelector } from '../redux/reduxHooks';
import { selectHelpUrl } from '../redux/slices/adminSlice';
import { selectOptionsVisibility, toggleOptionsVisibility } from '../redux/slices/appStateSlice';
import { selectHasRolePermissions, selectIsAdmin, selectIsLoggedIn } from '../redux/slices/currentUserSlice';
import { UserRole } from '../types/items';
import { useTranslate } from '../redux/componentHooks';
import LanguageSelectorComponent from './LanguageSelectorComponent';
import TooltipMarkerComponent from './TooltipMarkerComponent';
import LoginComponent from './LoginComponent';
import TooltipMarkerComponent from './TooltipMarkerComponent';

/**
* React Component that defines the header buttons at the top of a page
Expand Down Expand Up @@ -64,6 +64,8 @@ export default function HeaderButtonsComponent() {
shouldCSVReadingsButtonDisabled: true,
shouldUnitsButtonDisabled: true,
shouldConversionsButtonDisabled: true,
shouldDaysButtonDisabled: true,
shouldWeeksButtonDisabled: true,
shouldLogMsgButtonDisabled: true,
shouldVisualUnitMapButtonDisabled: true,
// Translated menu title that depend on whether logged in.
Expand Down Expand Up @@ -102,6 +104,8 @@ export default function HeaderButtonsComponent() {
shouldCSVReadingsButtonDisabled: pathname === '/csvReadings',
shouldUnitsButtonDisabled: pathname === '/units',
shouldConversionsButtonDisabled: pathname === '/conversions',
shouldDaysButtonDisabled: pathname === '/days',
shouldWeeksButtonDisabled: pathname === '/weeks',
shouldLogMsgButtonDisabled: pathname === '/logmsg',
shouldVisualUnitMapButtonDisabled: pathname === '/visual-unit'
}));
Expand Down Expand Up @@ -224,6 +228,20 @@ export default function HeaderButtonsComponent() {
to="/meters">
<FormattedMessage id='meters' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldDaysButtonDisabled}
tag={Link}
to="/days">
<FormattedMessage id='patterns.daily' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldWeeksButtonDisabled}
tag={Link}
to="/weeks">
<FormattedMessage id='patterns.weekly' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldUnitsButtonDisabled}
Expand Down Expand Up @@ -322,4 +340,4 @@ export default function HeaderButtonsComponent() {

</div>
);
}
}
14 changes: 9 additions & 5 deletions src/client/app/components/RouteComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@
import * as React from 'react';
import { IntlProvider } from 'react-intl';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import ReadingsCSVUploadComponent from '../components/csv/ReadingsCSVUploadComponent';
import MetersCSVUploadComponent from '../components/csv/MetersCSVUploadComponent';
import ReadingsCSVUploadComponent from '../components/csv/ReadingsCSVUploadComponent';
import MapCalibrationContainer from '../containers/maps/MapCalibrationContainer';
import MapsDetailContainer from '../containers/maps/MapsDetailContainer';
import { useAppSelector } from '../redux/reduxHooks';
import { selectSelectedLanguage } from '../redux/slices/appStateSlice';
import LocaleTranslationData from '../translations/data';
import { UserRole } from '../types/items';
import AppLayout from './AppLayout';
import HomeComponent from './HomeComponent';
import AdminComponent from './admin/AdminComponent';
import LogMsgComponent from './admin/LogMsgComponent';
import UsersDetailComponent from './admin/users/UsersDetailComponent';
import ConversionsDetailComponent from './conversion/ConversionsDetailComponent';
import DaysDetailComponent from './days/DaysDetailComponent';
import GroupsDetailComponent from './groups/GroupsDetailComponent';
import MetersDetailComponent from './meters/MetersDetailComponent';
import AdminOutlet from './router/AdminOutlet';
import ErrorComponent from './router/ErrorComponent';
import { GraphLink } from './router/GraphLinkComponent';
import NotFound from './router/NotFoundOutlet';
import RoleOutlet from './router/RoleOutlet';
import UnitsDetailComponent from './unit/UnitsDetailComponent';
import ErrorComponent from './router/ErrorComponent';
import { selectSelectedLanguage } from '../redux/slices/appStateSlice';
import LogMsgComponent from './admin/LogMsgComponent';
import VisualUnitDetailComponent from './visual-unit/VisualUnitDetailComponent';
import WeeksDetailComponent from './weeks/WeeksDetailComponent';

/**
* @returns the router component Responsible for client side routing.
Expand Down Expand Up @@ -57,13 +59,15 @@ const router = createBrowserRouter([
{ path: 'admin', element: <AdminComponent /> },
{ path: 'calibration', element: <MapCalibrationContainer /> },
{ path: 'conversions', element: <ConversionsDetailComponent /> },
{ path: 'days', element: <DaysDetailComponent /> },
{ path: 'weeks', element: <WeeksDetailComponent /> },
{ path: 'csvMeters', element: <MetersCSVUploadComponent /> },
{ path: 'maps', element: <MapsDetailContainer /> },
{ path: 'units', element: <UnitsDetailComponent /> },
{ path: 'users', element: <UsersDetailComponent /> },
{ path: 'logmsg', element: <LogMsgComponent /> },
{ path: 'users', element: <UsersDetailComponent /> },
{ path: 'visual-unit', element: <VisualUnitDetailComponent/> }
{ path: 'visual-unit', element: <VisualUnitDetailComponent /> }
]
},
{
Expand Down
8 changes: 7 additions & 1 deletion src/client/app/components/TooltipHelpComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import ReactTooltip from 'react-tooltip';
import { selectOEDVersion } from '../redux/api/versionApi';
import { useTranslate } from '../redux/componentHooks';
import { useAppSelector } from '../redux/reduxHooks';
import { selectHelpUrl } from '../redux/slices/adminSlice';
import '../styles/tooltip.css';
import { useTranslate } from '../redux/componentHooks';

interface TooltipHelpProps {
page: string; // Specifies which page the tip is in.
Expand All @@ -32,6 +32,9 @@ export default function TooltipHelpComponent(props: TooltipHelpProps) {
'help.admin.conversioncreate': { link: `${helpUrl}/adminConversionCreating/` },
'help.admin.conversionedit': { link: `${helpUrl}/adminConversionEditing/` },
'help.admin.conversionview': { link: `${helpUrl}/adminConversionViewing/` },
'help.admin.daycreate': { link: `${helpUrl}` }, // TODO: Add specific link for day creation
'help.admin.dayedit': { link: `${helpUrl}` }, // TODO: Add specific link for day editing
'help.admin.dayview': { link: `${helpUrl}` }, // TODO: Add specific link for day viewing
'help.admin.groupcreate': { link: `${helpUrl}/adminGroupCreating/` },
'help.admin.groupedit': { link: `${helpUrl}/adminGroupEditing/` },
'help.admin.groupview': { link: `${helpUrl}/adminGroupViewing/` },
Expand All @@ -44,6 +47,9 @@ export default function TooltipHelpComponent(props: TooltipHelpProps) {
'help.admin.unitedit': { link: `${helpUrl}/adminUnitEditing/` },
'help.admin.unitview': { link: `${helpUrl}/adminUnitViewing/` },
'help.admin.users': { link: `${helpUrl}/adminUser/` },
'help.admin.weekcreate': { link: `${helpUrl}` }, // TODO: Add specific link for week creation
'help.admin.weekedit': { link: `${helpUrl}` }, // TODO: Add specific link for week editing
'help.admin.weekview': { link: `${helpUrl}` }, // TODO: Add specific link for week viewing
'help.csv.meters': { link: `${helpUrl}/adminMetersImport/` },
'help.csv.readings': { link: `${helpUrl}/adminReadingsImport/` },
'help.home.area.normalize': { link: `${helpUrl}/areaNormalization/` },
Expand Down
3 changes: 2 additions & 1 deletion src/client/app/components/admin/LogMsgComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import { TimeInterval } from '../../../../common/TimeInterval';
import { dateRangeToTimeInterval, timeIntervalToDateRange } from '../../utils/dateRangeCompatibility';
import { titleStyle } from '../../styles/modalStyle';
import { useTranslate } from '../../redux/componentHooks';
import { ROWS_PER_TABLE } from '../../utils/pagination';

// number of log messages to display per page
const PER_PAGE = 20;
const PER_PAGE = ROWS_PER_TABLE;

enum LogTypes {
ERROR = 'ERROR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ export default function ConversionViewComponent(props: ConversionViewComponentPr
<div className={props.conversion.bidirectional.toString()}>
<b><FormattedMessage id="conversion.bidirectional" /></b> {translate(`TrueFalseType.${props.conversion.bidirectional.toString()}`)}
</div>
<div className="item-container">
<b><FormattedMessage id="conversion.slope" /></b> {props.conversion.slope}
</div>
<div className="item-container">
<b><FormattedMessage id="conversion.intercept" /></b> {props.conversion.intercept}
</div>
<div className="item-container">
{/* Only show first 30 characters so card does not get too big. Should limit to one line */}
<b><FormattedMessage id="note" /></b> {props.conversion.note.slice(0, 29)}
Expand Down
Loading