Replace city and country by sortable location
This commit is contained in:
parent
3b4593540f
commit
57a63fa711
2 changed files with 6 additions and 3 deletions
|
@ -394,7 +394,7 @@ class AmbassadorsPage extends Component {
|
|||
<EnhancedTable
|
||||
columnData={columnData}
|
||||
data={data}
|
||||
orderBy="nickname"
|
||||
orderBy="location"
|
||||
showSearchColumns={false}
|
||||
rowsPerPage={10}
|
||||
isAdmin={false}
|
||||
|
|
|
@ -54,8 +54,7 @@ const mapsStyles = {
|
|||
const columnData = [
|
||||
{ id: 'name', numeric: false, disablePadding: true, label: 'Name' },
|
||||
{ id: 'address', numeric: false, disablePadding: true, label: 'Address' },
|
||||
{ id: 'city', numeric: false, disablePadding: false, label: 'City' },
|
||||
{ id: 'country', numeric: false, disablePadding: false, label: 'Country' },
|
||||
{ id: 'location', numeric: false, disablePadding: false, label: 'Location' },
|
||||
{ id: 'map', numeric: false, disablePadding: false, label: 'Maps', disableSearch: true}
|
||||
];
|
||||
|
||||
|
@ -203,6 +202,10 @@ class MerchantsPage extends Component {
|
|||
<div><b>Address</b>: {merchant.address}</div>
|
||||
{(merchant.phone) && (<div><b>Phone</b>: {merchant.phone}</div>)}
|
||||
</div>;
|
||||
merchant.location = {
|
||||
searchText: `${merchant.country} - ${merchant.city}`,
|
||||
value: (merchant.city) ? `${merchant.city} - ${merchant.country}`: merchant.country
|
||||
}
|
||||
merchant.map = <Button
|
||||
className="App-button"
|
||||
variant="contained"
|
||||
|
|
Loading…
Reference in a new issue