Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC-184 Customer #619

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare var homePath: string;

const fieldCols: SC.IByCol<OpenXDA.Types.Customer>[] = [
{ 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' }
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,28 +134,26 @@ 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}
>
<Column<LocalXDA.CustomerAsset>
Key={'AssetKey'}
Key={'AssetName'}
AllowSort={true}
Field={'AssetKey'}
Field={'AssetName'}
HeaderStyle={{ width: 'auto' }}
RowStyle={{ width: 'auto' }}
> Key
> Name
</Column>
<Column<LocalXDA.CustomerAsset>
Key={'AssetName'}
Key={'AssetKey'}
AllowSort={true}
Field={'AssetName'}
Field={'AssetKey'}
HeaderStyle={{ width: 'auto' }}
RowStyle={{ width: 'auto' }}
> Name
> Key
</Column>
<Column<LocalXDA.CustomerAsset>
Key={'AssetType'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,28 +199,26 @@ 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}
>
<Column<LocalXDA.CustomerMeter>
Key={'MeterKey'}
Key={'MeterName'}
AllowSort={true}
Field={'MeterKey'}
Field={'MeterName'}
HeaderStyle={{ width: 'auto' }}
RowStyle={{ width: 'auto' }}
> Key
> Name
</Column>
<Column<LocalXDA.CustomerMeter>
Key={'MeterName'}
Key={'MeterKey'}
AllowSort={true}
Field={'MeterName'}
Field={'MeterKey'}
HeaderStyle={{ width: 'auto' }}
RowStyle={{ width: 'auto' }}
> Name
> Key
</Column>
<Column<LocalXDA.CustomerMeter>
Key={'MeterLocation'}
Expand Down Expand Up @@ -268,10 +266,10 @@ const CustomerMeterWindow = (props: IProps) => {
GetEnum={getEnum}
GetAddlFields={getAdditionalMeterFields}
>
<Column Key="AssetKey" Field="AssetKey" HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }}
>Key</Column>
<Column Key="Name" Field="Name" HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }}
>Name</Column>
<Column Key="AssetKey" Field="AssetKey" HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }}
>Key</Column>
<Column Key="Location" Field="Location" HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }}
>Substation</Column>
<Column Key="MappedAssets" Field="MappedAssets" HeaderStyle={{ width: 'auto' }} RowStyle={{ width: 'auto' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export const MeasurementCharacteristicSlice = new GenericSlice<OpenXDA.Types.Mea
export const DataFileSlice = new GenericSlice<OpenXDA.Types.DataFile>("DataFile", `${homePath}api/OpenXDA/DataFile`, "ProcessingEndTime", false);
export const EventTypeAssetTypeSlice = new GenericSlice<OpenXDA.Types.EventTypeAssetType>("EventTypeAssetType", `${homePath}api/OpenXDA/EventTypeAssetType`, "ID", false);
export const CustomerSlice = new GenericSlice<OpenXDA.Types.Customer>("Customer", `${homePath}api/SystemCenter/Customer`, "CustomerKey", false);
export const CustomerMeterSlice = new GenericSlice<LocalXDA.CustomerMeter>('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterKey', false);
export const CustomerAssetSlice = new GenericSlice<LocalXDA.CustomerAsset>('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetKey', false);
export const CustomerMeterSlice = new GenericSlice<LocalXDA.CustomerMeter>('CustomerMeter', `${homePath}api/SystemCenter/CustomerMeter`, 'MeterName', true);
export const CustomerAssetSlice = new GenericSlice<LocalXDA.CustomerAsset>('CustomerAsset', `${homePath}api/SystemCenter/CustomerAsset`, 'AssetName', true);


export const EventTypeSlice = new GenericSlice<OpenXDA.Types.EventType>("EventType", `${homePath}api/OpenXDA/EventType`, "Name");
Expand Down