From 8334dc8787fef341fffdf1b4e9c7ae6db33959ef Mon Sep 17 00:00:00 2001 From: collins-self Date: Mon, 24 Feb 2025 09:57:19 -0500 Subject: [PATCH 1/5] ByCustomer: Changed key name --- .../wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx index 378cafb3d..b9d374312 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx @@ -36,7 +36,7 @@ declare var homePath: string; const fieldCols: SC.IByCol[] = [ { Field: 'Name', Label: 'Name', Type: 'string', Width: '15%' }, - { Field: 'CustomerKey', Label: 'Customer Key', Type: 'string', Width: '15%' }, + { Field: 'CustomerKey', Label: 'Key', Type: 'string', Width: '15%' }, { Field: 'Phone', Label: 'Phone', Type: 'string', Width: '10%' }, { Field: 'Description', Label: 'Description', Type: 'string', Width: 'auto' }, { Field: 'LSCVS', Label: 'LSCVS', Type: 'boolean', Width: 'auto' } From 6fbed9dfa94d40db2c59e7b064947f07fa56b7e1 Mon Sep 17 00:00:00 2001 From: collins-self Date: Mon, 24 Feb 2025 09:59:06 -0500 Subject: [PATCH 2/5] CustomerMeter: Changed col order and ascending default --- .../TSX/SystemCenter/Customer/CustomerMeter.tsx | 12 ++++++------ .../wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx index 245b1d492..207722350 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx @@ -207,20 +207,20 @@ const CustomerMeterWindow = (props: IProps) => { KeySelector={(item) => item.ID} > - Key={'MeterKey'} + Key={'MeterName'} AllowSort={true} - Field={'MeterKey'} + Field={'MeterName'} HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }} - > Key + > Name - Key={'MeterName'} + Key={'MeterKey'} AllowSort={true} - Field={'MeterName'} + Field={'MeterKey'} HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }} - > Name + > Key Key={'MeterLocation'} diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts index 2e9f519a9..430a2cc92 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts @@ -73,7 +73,7 @@ export const MeasurementCharacteristicSlice = new GenericSlice("DataFile", `${homePath}api/OpenXDA/DataFile`, "ProcessingEndTime", false); export const EventTypeAssetTypeSlice = new GenericSlice("EventTypeAssetType", `${homePath}api/OpenXDA/EventTypeAssetType`, "ID", false); export const CustomerSlice = new GenericSlice("Customer", `${homePath}api/SystemCenter/Customer`, "CustomerKey", false); -export const CustomerMeterSlice = new GenericSlice('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterKey', false); +export const CustomerMeterSlice = new GenericSlice('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterKey', true); export const CustomerAssetSlice = new GenericSlice('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetKey', false); From 0a6d7e56c14265e85a0c3a7906b38aeef554086c Mon Sep 17 00:00:00 2001 From: collins-self Date: Mon, 24 Feb 2025 10:00:03 -0500 Subject: [PATCH 3/5] CustomerAsset: Changed col order and asc to default --- .../Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx | 6 +++--- .../wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx index 77461cecd..ebf7798d6 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx @@ -142,12 +142,12 @@ const CustomerAssetWindow = (props: IProps) => { KeySelector={(item) => item.ID} > - Key={'AssetKey'} + Key={'AssetName'} AllowSort={true} - Field={'AssetKey'} + Field={'AssetName'} HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }} - > Key + > Name Key={'AssetName'} diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts index 430a2cc92..1102039b5 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts @@ -74,7 +74,7 @@ export const DataFileSlice = new GenericSlice("DataFile" export const EventTypeAssetTypeSlice = new GenericSlice("EventTypeAssetType", `${homePath}api/OpenXDA/EventTypeAssetType`, "ID", false); export const CustomerSlice = new GenericSlice("Customer", `${homePath}api/SystemCenter/Customer`, "CustomerKey", false); export const CustomerMeterSlice = new GenericSlice('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterKey', true); -export const CustomerAssetSlice = new GenericSlice('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetKey', false); +export const CustomerAssetSlice = new GenericSlice('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetKey', true); export const EventTypeSlice = new GenericSlice("EventType", `${homePath}api/OpenXDA/EventType`, "Name"); From ea85317f31c8cf4d17dfa3a3c9135dc8a2ed0a2c Mon Sep 17 00:00:00 2001 From: collins-self Date: Mon, 24 Feb 2025 10:00:56 -0500 Subject: [PATCH 4/5] Additional Fix: table styling redundancies --- .../Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx | 6 ++---- .../Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx index ebf7798d6..ca620c0f3 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx @@ -134,10 +134,8 @@ const CustomerAssetWindow = (props: IProps) => { return; dispatch(CustomerAssetSlice.Sort({ SortField: d.colField, Ascending: d.ascending })); }} - TableStyle={{ padding: 0, width: '100%', tableLayout: 'fixed', display: 'flex', flexDirection: 'column', overflow: 'hidden' }} - TheadStyle={{ fontSize: 'smaller', display: 'table', tableLayout: 'fixed', width: '100%' }} - TbodyStyle={{ display: 'block', width: '100%', overflowY: 'auto', flex: 1 }} - RowStyle={{ fontSize: 'smaller', display: 'table', tableLayout: 'fixed', width: '100%' }} + TheadStyle={{ fontSize: 'smaller' }} + RowStyle={{ fontSize: 'smaller' }} Selected={(item) => false} KeySelector={(item) => item.ID} > diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx index 207722350..5bc602c22 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx @@ -199,10 +199,8 @@ const CustomerMeterWindow = (props: IProps) => { return; dispatch(CustomerMeterSlice.Sort({ SortField: d.colField, Ascending: d.ascending })); }} - TableStyle={{ padding: 0, width: '100%', tableLayout: 'fixed', display: 'flex', flexDirection: 'column', overflow: 'hidden' }} - TheadStyle={{ fontSize: 'smaller', display: 'table', tableLayout: 'fixed', width: '100%' }} - TbodyStyle={{ display: 'block', width: '100%', overflowY: 'auto', flex: 1 }} - RowStyle={{ fontSize: 'smaller', display: 'table', tableLayout: 'fixed', width: '100%' }} + TheadStyle={{ fontSize: 'smaller' }} + RowStyle={{ fontSize: 'smaller' }} Selected={(item) => false} KeySelector={(item) => item.ID} > From e1f97c2b9ff7d0d695c9841adeab086ba1059351 Mon Sep 17 00:00:00 2001 From: collins-self Date: Mon, 24 Feb 2025 10:13:08 -0500 Subject: [PATCH 5/5] Fix: sort order and col naming --- .../Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx | 2 +- .../Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx | 6 +++--- .../Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx | 4 ++-- .../wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx index b9d374312..37e3a1502 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/ByCustomer.tsx @@ -70,7 +70,7 @@ const ByCustomer: Application.Types.iByComponent = (props) => { PagingID='ByCustomer' OnClick={(item) => { handleSelect(item); }} Columns={fieldCols} - DefaultSearchAscending={false} DefaultSearchKey='Name' + DefaultSearchAscending={true} DefaultSearchKey='Name' QueryAdditionalFields={() => $.ajax({ type: "GET", diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx index ca620c0f3..66e46f4c4 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx @@ -148,12 +148,12 @@ const CustomerAssetWindow = (props: IProps) => { > Name - Key={'AssetName'} + Key={'AssetKey'} AllowSort={true} - Field={'AssetName'} + Field={'AssetKey'} HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }} - > Name + > Key Key={'AssetType'} diff --git a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx index 5bc602c22..6813552a5 100644 --- a/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx +++ b/Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx @@ -266,10 +266,10 @@ const CustomerMeterWindow = (props: IProps) => { GetEnum={getEnum} GetAddlFields={getAdditionalMeterFields} > - Key Name + Key Substation ("DataFile", `${homePath}api/OpenXDA/DataFile`, "ProcessingEndTime", false); export const EventTypeAssetTypeSlice = new GenericSlice("EventTypeAssetType", `${homePath}api/OpenXDA/EventTypeAssetType`, "ID", false); export const CustomerSlice = new GenericSlice("Customer", `${homePath}api/SystemCenter/Customer`, "CustomerKey", false); -export const CustomerMeterSlice = new GenericSlice('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterKey', true); -export const CustomerAssetSlice = new GenericSlice('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetKey', true); +export const CustomerMeterSlice = new GenericSlice('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterName', true); +export const CustomerAssetSlice = new GenericSlice('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetName', true); export const EventTypeSlice = new GenericSlice("EventType", `${homePath}api/OpenXDA/EventType`, "Name");