Skip to content

Commit

Permalink
Pallid release 6/25/2024 (v1.5.0) (#116)
Browse files Browse the repository at this point in the history
* bugfixes for supplemental tab fields

* telemetry bendrivermile display only in table (#115)
  • Loading branch information
jguevarra authored Oct 1, 2024
1 parent a9b0a38 commit e0e4efa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/app-bundles/data-entry-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ export default {
type: 'missouriRiver',
},
});

// Update base data
store.doSitesFetch(body?.items?.[0]?.siteId);
dispatch({ type: 'UPDATE_BASE_DATA', payload: { mrId: body?.items?.[0]?.mrId, mrFid: body?.items?.[0]?.mrFid } });

if (store.selectDataEntryTotalCount() === 0) {
Expand Down Expand Up @@ -242,6 +245,9 @@ export default {
payload: body,
});

// Update base data
store.doSitesFetch(body?.items?.[0]?.siteId);

if (store.selectDataEntryFishTotalCount() === 0) {
if (ignoreToast) { tWarning(toastId, 'No Fish datasheet(s) found.'); }
} else {
Expand Down Expand Up @@ -270,6 +276,9 @@ export default {
payload: body,
});

// Update base data
store.doSitesFetch(body?.items?.[0]?.siteId);

if (store.selectDataEntrySupplementalTotalCount() === 0) {
if (ignoreToast) { tWarning(toastId, 'No Supplemental datasheet(s) found.'); }
} else {
Expand Down Expand Up @@ -298,6 +307,9 @@ export default {
payload: body,
});

// Update base data
store.doSitesFetch(body?.items?.[0]?.siteId);

if (store.selectDataEntryProcedureTotalCount() === 0) {
if (ignoreToast) { tWarning(toastId, 'No Procedure datasheet(s) found.'); }
} else {
Expand Down Expand Up @@ -329,6 +341,9 @@ export default {
},
});

// Update base data
store.doSitesFetch(body?.items?.[0]?.siteId);

if (store.selectDataEntryTotalCount() === 0) {
if (ignoreToast) { tWarning(toastId, 'No Search Effort datasheet(s) found'); }
} else {
Expand Down Expand Up @@ -357,6 +372,9 @@ export default {
payload: body,
});

// Update base data
store.doSitesFetch(body?.items?.[0]?.siteId);

if (store.selectDataEntryTelemetryTotalCount() === 0) {
if (ignoreToast) { tWarning(toastId, 'No Telemetry datasheet(s) found.'); }
} else {
Expand Down
11 changes: 8 additions & 3 deletions src/app-pages/data-entry/datasheets/tables/telemetryDsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,28 @@ const TelemetryDsTable = connect(
'selectDataEntryTelemetryData',
'selectDataEntryLastParams',
'selectUserRole',
'selectBaseData',
({
doModalOpen,
doSaveTelemetryDataEntry,
doUpdateTelemetryDataEntry,
dataEntryTelemetryData,
dataEntryLastParams,
userRole
userRole,
baseData
}) => {
const { items } = dataEntryTelemetryData;
const gridRef = useRef();

const rowData = items?.map(item => ({ ...item, bendRiverMile: baseData?.bendRiverMile }));

const lastRow = dataEntryTelemetryData.items[dataEntryTelemetryData.totalCount - 1];
const initialState = {
seId: dataEntryLastParams.seId
};

const addRow = useCallback(() => {
gridRef.current.api.applyTransaction({ add: [{}] });
gridRef.current.api.applyTransaction({ add: [{ bendRiverMile: baseData?.bendRiverMile }] });
}, []);

const copyLastRow = () => {
Expand Down Expand Up @@ -107,7 +111,7 @@ const TelemetryDsTable = connect(
editType='fullRow'
onRowValueChanged={({ data }) => !data.tId ? doSaveTelemetryDataEntry({...initialState ,...data}, { seId: dataEntryLastParams.seId, id: userRole.id }) : doUpdateTelemetryDataEntry(data, { seId: dataEntryLastParams.seId, id: userRole.id })}
rowHeight={35}
rowData={items}
rowData={rowData}
frameworkComponents={{
editCellRenderer: EditCellRenderer,
selectEditor: SelectEditor,
Expand Down Expand Up @@ -137,6 +141,7 @@ const TelemetryDsTable = connect(
/>
<AgGridColumn field='tFid' sortable unSortIcon />
<AgGridColumn field='bend' cellEditor='floatEditor' sortable unSortIcon />
<AgGridColumn field='bendRiverMile' sortable unSortIcon editable={false} />
<AgGridColumn field='radioTagNum' headerName='Radio Tag #' cellEditor='numberEditor' cellEditorParams={{ isRequired: true }} width={125} sortable unSortIcon />
<AgGridColumn field='frequencyIdCode' headerName='Frequency Id' cellEditor='selectEditor' cellEditorParams={{ options: frequencyIdOptions, type: 'number', isRequired: true }} width={125} sortable unSortIcon />
<AgGridColumn field='captureDate' headerName='Capture Time' width={125} sortable unSortIcon />
Expand Down

0 comments on commit e0e4efa

Please sign in to comment.