Skip to content

Commit c73153e

Browse files
collins-selfcollins-self
authored andcommitted
update LocationDrawingsModal and LocationDrawingsTable for improved state management
1 parent f8dbf22 commit c73153e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/CommonComponents/LocationDrawingsModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const LocationDrawingsModal = (props: IProps) => {
3939
ShowX={true} Size={'lg'}
4040
CallBack={() => props.SetShow(false)}
4141
ShowCancel={false}
42-
ConfirmText={'Done'}>
42+
ShowConfirm={false}>
4343
<div className="row">
4444
<div className="col-12">
4545
<LocationDrawingsTable

Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Location/LocationDrawingsTable.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//******************************************************************************************************
22
// LocationDrawings.tsx - Gbtc
33
//
4-
// Copyright © 2023, Grid Protection Alliance. All Rights Reserved.
4+
// Copyright © 2024, Grid Protection Alliance. All Rights Reserved.
55
//
66
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
77
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
@@ -61,7 +61,9 @@ const LocationDrawingsTable = (props: IProps) => {
6161
.done((result) => {
6262
setLinks(JSON.parse(result.Data as unknown as string));
6363
if (result.NumberOfPages === 0) result.NumberOfPages = 1;
64-
setPageInfo(result);
64+
setPageInfo({RecordsPerPage: result.RecordsPerPage,
65+
NumberOfPages: result.NumberOfPages,
66+
TotalRecords: result.TotalRecords});
6567
setPageState('idle');
6668
})
6769
.fail(() => setPageState('error'));

0 commit comments

Comments
 (0)