Add phone, clicable website and telegram to /merchants
This commit is contained in:
parent
4f82dbc33f
commit
8e57fb30bf
1 changed files with 11 additions and 6 deletions
|
@ -54,9 +54,11 @@ const mapsStyles = {
|
||||||
|
|
||||||
const columnData = [
|
const columnData = [
|
||||||
{ id: 'name', numeric: false, disablePadding: true, label: 'Name' },
|
{ id: 'name', numeric: false, disablePadding: true, label: 'Name' },
|
||||||
{ id: 'phone', numeric: false, disablePadding: true, label: 'Contact' },
|
|
||||||
{ id: 'address', numeric: false, disablePadding: true, label: 'Address' },
|
{ id: 'address', numeric: false, disablePadding: true, label: 'Address' },
|
||||||
{ id: 'location', numeric: false, disablePadding: false, label: 'Location' },
|
{ id: 'phone', numeric: false, disablePadding: true, label: 'Phone' },
|
||||||
|
{ id: 'link', numeric: false, disablePadding: false, label: 'Website' },
|
||||||
|
{ id: 'telegram', numeric: false, disablePadding: true, label: 'telegram' },
|
||||||
|
{ id: 'website', numeric: false, disablePadding: true, label: 'website' },
|
||||||
{ id: 'map', numeric: false, disablePadding: false, label: 'Maps', disableSearch: true}
|
{ id: 'map', numeric: false, disablePadding: false, label: 'Maps', disableSearch: true}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -204,10 +206,13 @@ class MerchantsPage extends Component {
|
||||||
<div><b>Address</b>: {merchant.address}</div>
|
<div><b>Address</b>: {merchant.address}</div>
|
||||||
{(merchant.phone) && (<div><b>Phone</b>: {merchant.phone}</div>)}
|
{(merchant.phone) && (<div><b>Phone</b>: {merchant.phone}</div>)}
|
||||||
</div>;
|
</div>;
|
||||||
merchant.location = {
|
merchant.link = {
|
||||||
searchText: `${merchant.country} - ${merchant.city}`,
|
searchText: stripProtocol(merchant.website),
|
||||||
value: (merchant.city) ? `${merchant.city} - ${merchant.country}`: merchant.country
|
value: (
|
||||||
}
|
<a target="_blank" rel="noopener noreferrer"
|
||||||
|
href={merchant.website}>{stripProtocol(merchant.website)}</a>
|
||||||
|
)
|
||||||
|
};
|
||||||
merchant.map = <Button
|
merchant.map = <Button
|
||||||
className="App-button"
|
className="App-button"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|
Loading…
Reference in a new issue