Skip to content

Commit

Permalink
Change dataset in UI to be data set
Browse files Browse the repository at this point in the history
  • Loading branch information
gcsantos-gpa committed Jul 2, 2024
1 parent b7306da commit ed8bbb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions TrenDAP/wwwroot/TypeScript/Features/DataSets/DataSets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const DataSets: React.FunctionComponent = (props: {}) => {
<div className="card-header">
<div className="row">
<div className="col">
<h4>My DataSets</h4>
<h4>My Data Sets</h4>
</div>
<div className="col">
<button className="btn btn-primary pull-right"
Expand Down Expand Up @@ -147,7 +147,7 @@ const DataSets: React.FunctionComponent = (props: {}) => {
<div className="card">
<div className="card-header">
<h4>
Shared DataSets
Shared Data Sets
</h4>
</div>
<div className="card-body">
Expand Down
10 changes: 5 additions & 5 deletions TrenDAP/wwwroot/TypeScript/Features/DataSets/EditDataSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ const EditDataSet: React.FunctionComponent<{}> = (props) => {
if (dataSet == null) return;
const w = [];
if (dataSet.Context == 'Relative' && dataSet.RelativeWindow == 'Day' && dataSet.RelativeValue < 7)
w.push("With the current Time Context and Day of Week Filter it is possible for the dataset to be empty at times.")
w.push("With the current Time Context and Day of Week Filter it is possible for the data set to be empty at times.")
if (dataSet.Context == 'Relative' && dataSet.RelativeWindow == 'Week' && dataSet.RelativeValue < 53)
w.push("With the current Time Context and Week of Year Filter it is possible for the dataset to be empty at times.")
w.push("With the current Time Context and Week of Year Filter it is possible for the data set to be empty at times.")
if (dataSet.Context == 'Relative' && dataSet.RelativeWindow == 'Day' && dataSet.RelativeValue < 366)
w.push("With the current Time Context and Week of Year Filter it is possible for the dataset to be empty at times.")
w.push("With the current Time Context and Week of Year Filter it is possible for the data set to be empty at times.")
setWarning(w);
}, [dataSet]);

Expand All @@ -117,9 +117,9 @@ const EditDataSet: React.FunctionComponent<{}> = (props) => {
else if (dataSet.Name.length > 200)
e.push("Name has to be less than 200 characters.");
else if (dataSets.findIndex(ds => (ds.Public || ds.User === userName) && ds.ID !== dataSet.ID && ds.Name.toLowerCase() == dataSet.Name.toLowerCase()) > -1)
e.push("A DataSet with this name already exists.");
e.push("A Data Set with this name already exists.");
else if (dataSet.Public && dataSets.findIndex(ds => ds.ID !== dataSet.ID && ds.Name.toLowerCase() == dataSet.Name.toLowerCase()) > -1)
e.push("A DataSet with this name was already created by another user.");
e.push("A Data Set with this name was already created by another user.");
if (dataSet.Context == 'Fixed Dates' && moment(dataSet.From).isAfter(moment(dataSet.To)))
e.push("A valid Timeframe has to be selected.")
if (dataSet.Hours == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const DataSetSettingsTab: React.FunctionComponent<IProps> = (props: IProps) => {
return false;
}
else if (dataSets.findIndex(ds => (ds.Public || ds.User === userName) && ds.ID !== props.DataSet.ID && ds.Name.toLowerCase() == props.DataSet.Name.toLowerCase()) > -1) {
setNameFeedback("A DataSet with this name already exists.")
setNameFeedback("A Data Set with this name already exists.")
return false;
}
else if (props.DataSet.Public && dataSets.findIndex(ds => ds.ID !== props.DataSet.ID && ds.Name.toLowerCase() == props.DataSet.Name.toLowerCase()) > -1) {
setNameFeedback("A DataSet with this name was already created by another user.");
setNameFeedback("A Data Set with this name was already created by another user.");
return false;
} else return true;
}
Expand Down

0 comments on commit ed8bbb6

Please sign in to comment.