Compare commits
18 commits
7a17666e76
...
15bea6826f
Author | SHA1 | Date | |
---|---|---|---|
|
15bea6826f | ||
|
84d64b3194 | ||
|
3489f29089 | ||
|
2a5618a999 | ||
|
19d0223959 | ||
|
bd40a19942 | ||
|
4df858b4f0 | ||
|
deb9c2eb4f | ||
|
65451e1cca | ||
|
c5576bb57b | ||
|
775ed18e38 | ||
|
f325cd3478 | ||
|
f19f304477 | ||
|
3aa855ef70 | ||
|
0841aabb14 | ||
|
0d8d5811c8 | ||
|
c932afdeee | ||
|
0eef532e0e |
8 changed files with 88 additions and 84 deletions
|
@ -8,6 +8,7 @@
|
||||||
"@material-ui/icons": "^3.0.1",
|
"@material-ui/icons": "^3.0.1",
|
||||||
"bootstrap": "^4.1.3",
|
"bootstrap": "^4.1.3",
|
||||||
"country-list": "^1.1.0",
|
"country-list": "^1.1.0",
|
||||||
|
"font-awesome": "^4.7.0",
|
||||||
"mdbreact": "^4.7.1",
|
"mdbreact": "^4.7.1",
|
||||||
"react": "^16.5.2",
|
"react": "^16.5.2",
|
||||||
"react-dom": "^16.5.2",
|
"react-dom": "^16.5.2",
|
||||||
|
@ -15,7 +16,6 @@
|
||||||
"react-intl": "^2.6.0",
|
"react-intl": "^2.6.0",
|
||||||
"react-modal": "^3.5.1",
|
"react-modal": "^3.5.1",
|
||||||
"react-ripples": "^1.1.2",
|
"react-ripples": "^1.1.2",
|
||||||
"react-router-dom": "^4.3.1",
|
|
||||||
"react-scripts": "^1.1.5",
|
"react-scripts": "^1.1.5",
|
||||||
"react-scroll": "^1.7.10",
|
"react-scroll": "^1.7.10",
|
||||||
"recompose": "^0.30.0",
|
"recompose": "^0.30.0",
|
||||||
|
|
|
@ -169,37 +169,38 @@ class EnhancedTable extends Component {
|
||||||
|
|
||||||
const searchQuery = query;
|
const searchQuery = query;
|
||||||
const searchColumns = this.state.searchColumns;
|
const searchColumns = this.state.searchColumns;
|
||||||
const data = this.props.data.filter((item) => {
|
const data = this.filterData(this.props.data, searchQuery, searchColumns);
|
||||||
let insert = false;
|
|
||||||
|
|
||||||
// Iterate over the search column select boxes
|
|
||||||
searchColumns.map(column => {
|
|
||||||
try {
|
|
||||||
if( column.checked && (item[column.name] !== undefined) ) {
|
|
||||||
|
|
||||||
if(item[column.name].hasOwnProperty('searchText') && item[column.name].searchText.toLowerCase().indexOf(searchQuery.toLowerCase().trim()) !== -1){
|
|
||||||
insert = true;
|
|
||||||
}
|
|
||||||
else if(item[column.name].toLowerCase().indexOf(searchQuery.toLowerCase().trim()) !== -1){
|
|
||||||
insert = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(error) {
|
|
||||||
//console.error(error);
|
|
||||||
}
|
|
||||||
return column;
|
|
||||||
});
|
|
||||||
|
|
||||||
if(insert){
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.props.onSearchChange(data);
|
this.props.onSearchChange(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Sort the passed data based on the current component state.
|
||||||
|
sortData = (data) => {
|
||||||
|
const orderBy = this.state.orderBy;
|
||||||
|
const order = this.state.order;
|
||||||
|
|
||||||
|
data =
|
||||||
|
order === 'desc'
|
||||||
|
? data.sort((a, b) => {
|
||||||
|
let a_value = (a[orderBy] !== undefined) ? a[orderBy]: '';
|
||||||
|
let b_value = (b[orderBy] !== undefined) ? b[orderBy]: '';
|
||||||
|
a_value = a_value.hasOwnProperty('searchText') ? a_value.searchText.toLowerCase() : a_value.toLowerCase();
|
||||||
|
b_value = b_value.hasOwnProperty('searchText') ? b_value.searchText.toLowerCase() : b_value.toLowerCase();
|
||||||
|
return (b_value < a_value) ? -1 : 1;
|
||||||
|
})
|
||||||
|
: data.sort((a, b) => {
|
||||||
|
let a_value = (a[orderBy] !== undefined) ? a[orderBy]: '';
|
||||||
|
let b_value = (b[orderBy] !== undefined) ? b[orderBy]: '';
|
||||||
|
a_value = a_value.hasOwnProperty('searchText') ? a_value.searchText.toLowerCase() : a_value.toLowerCase();
|
||||||
|
b_value = b_value.hasOwnProperty('searchText') ? b_value.searchText.toLowerCase() : b_value.toLowerCase();
|
||||||
|
if(a_value.trim() === '') a_value = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
|
||||||
|
if(b_value.trim() === '') b_value = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
|
||||||
|
return (a_value < b_value) ? -1 : 1;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the search column select box
|
* Update the search column select box
|
||||||
*/
|
*/
|
||||||
|
@ -212,6 +213,48 @@ class EnhancedTable extends Component {
|
||||||
|
|
||||||
isSelected = id => this.state.selected.indexOf(id) !== -1;
|
isSelected = id => this.state.selected.indexOf(id) !== -1;
|
||||||
|
|
||||||
|
filterData(data, searchQuery, searchColumns) {
|
||||||
|
// Remove white spaces and wrong "" split
|
||||||
|
const queryTerms = searchQuery.split(' ').filter(value => value !== '');
|
||||||
|
|
||||||
|
return data.filter((item) => {
|
||||||
|
|
||||||
|
const insertArray = [];
|
||||||
|
// Implement hardcoded AND query over each column
|
||||||
|
// Iterate over each search term
|
||||||
|
queryTerms.forEach(searchItem => {
|
||||||
|
let insert = false;
|
||||||
|
// Iterate over the search column select boxes
|
||||||
|
searchColumns.map(column => {
|
||||||
|
try {
|
||||||
|
if( column.checked && (item[column.name] !== undefined) ) {
|
||||||
|
if(item[column.name].hasOwnProperty('searchText') &&
|
||||||
|
item[column.name].searchText.toLowerCase().indexOf(searchItem.toLowerCase().trim()) !== -1
|
||||||
|
){
|
||||||
|
insert = true;
|
||||||
|
}
|
||||||
|
else if(item[column.name].toLowerCase().indexOf(searchItem.toLowerCase().trim()) !== -1){
|
||||||
|
insert = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(error) {
|
||||||
|
//console.error(error);
|
||||||
|
}
|
||||||
|
return column;
|
||||||
|
});
|
||||||
|
|
||||||
|
insertArray.push(insert);
|
||||||
|
});
|
||||||
|
|
||||||
|
// AND logic
|
||||||
|
if(insertArray.filter(item => !item).length === 0){
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { data } = this.props;
|
let { data } = this.props;
|
||||||
const { columnData, rowsPerPageOptions, showSearchColumns } = this.props;
|
const { columnData, rowsPerPageOptions, showSearchColumns } = this.props;
|
||||||
|
@ -219,49 +262,10 @@ class EnhancedTable extends Component {
|
||||||
|
|
||||||
// Logic of search query and columns
|
// Logic of search query and columns
|
||||||
if(searchQuery.length > 0) {
|
if(searchQuery.length > 0) {
|
||||||
|
data = this.filterData(data, searchQuery, searchColumns);
|
||||||
// Remove white spaces and wrong "" split
|
|
||||||
const queryTerms = searchQuery.split(' ').filter(value => value !== '');
|
|
||||||
|
|
||||||
data = data.filter((item) => {
|
|
||||||
|
|
||||||
const insertArray = [];
|
|
||||||
// Implement hardcoded AND query over each column
|
|
||||||
// Iterate over each search term
|
|
||||||
queryTerms.forEach(searchItem => {
|
|
||||||
let insert = false;
|
|
||||||
// Iterate over the search column select boxes
|
|
||||||
searchColumns.map(column => {
|
|
||||||
try {
|
|
||||||
if( column.checked && (item[column.name] !== undefined) ) {
|
|
||||||
if(item[column.name].hasOwnProperty('searchText') &&
|
|
||||||
item[column.name].searchText.toLowerCase().indexOf(searchItem.toLowerCase().trim()) !== -1
|
|
||||||
){
|
|
||||||
insert = true;
|
|
||||||
}
|
|
||||||
else if(item[column.name].toLowerCase().indexOf(searchItem.toLowerCase().trim()) !== -1){
|
|
||||||
insert = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(error) {
|
|
||||||
//console.error(error);
|
|
||||||
}
|
|
||||||
return column;
|
|
||||||
});
|
|
||||||
|
|
||||||
insertArray.push(insert);
|
|
||||||
});
|
|
||||||
|
|
||||||
// AND logic
|
|
||||||
if(insertArray.filter(item => !item).length === 0){
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data = this.sortData(data);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={styles.root}>
|
<div style={styles.root}>
|
||||||
|
|
|
@ -374,7 +374,7 @@ class AmbassadorsPage extends Component {
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
|
|
||||||
<div id="maincontent">
|
<div id="maincontent">
|
||||||
<section data-spy="scroll" data-target="#mainNav" id="services">
|
<section data-spy="scroll" data-target="#mainNav" id="services" className="ambs_services">
|
||||||
<div className="containerfix">
|
<div className="containerfix">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-md-10 mx-md-auto">
|
<div className="col-md-10 mx-md-auto">
|
||||||
|
|
|
@ -3,4 +3,8 @@
|
||||||
}
|
}
|
||||||
.merchants_services .MuiNotchedOutline-focused-120 {
|
.merchants_services .MuiNotchedOutline-focused-120 {
|
||||||
border-color: rgb(19, 143, 82) !important;
|
border-color: rgb(19, 143, 82) !important;
|
||||||
|
}
|
||||||
|
.merchants_services table,
|
||||||
|
.ambs_services table {
|
||||||
|
min-width: 100% !important;
|
||||||
}
|
}
|
|
@ -307,10 +307,6 @@ class MerchantsPage extends Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
result.data.map(merchant => {
|
result.data.map(merchant => {
|
||||||
const infoDescription = <div>
|
|
||||||
<div><b>Address</b>: {merchant.address}</div>
|
|
||||||
{(merchant.phone) && (<div><b>Phone</b>: {merchant.phone}</div>)}
|
|
||||||
</div>;
|
|
||||||
if(merchant.telegram){
|
if(merchant.telegram){
|
||||||
merchant.telegram_original = merchant.telegram;
|
merchant.telegram_original = merchant.telegram;
|
||||||
merchant.telegram = {
|
merchant.telegram = {
|
||||||
|
|
|
@ -24,7 +24,7 @@ const messages = {
|
||||||
'es': messages_es
|
'es': messages_es
|
||||||
};
|
};
|
||||||
|
|
||||||
const language = 'en';
|
const language = 'es';
|
||||||
|
|
||||||
// Add IntlProvider to make the internationalization functions visible in all
|
// Add IntlProvider to make the internationalization functions visible in all
|
||||||
// our components.
|
// our components.
|
||||||
|
|
|
@ -73,13 +73,13 @@
|
||||||
"marketing.button.promotional_displays": "Promotional Displays",
|
"marketing.button.promotional_displays": "Promotional Displays",
|
||||||
"marketing.accordion.promotional_displays1": "<a target='_blank' rel='noopener noreferrer' href='https://keybase.io/team/Agorise' class='list-group-item list-group-item-action flex-column align-items-start'> <div class='d-flex w-100 justify-content-between'> <h5 class='mb-1'> Logos, Advertising images, Stickers and Merchandise, etc. (in the /PalmPay folder) </h5> </div> <p class='mb-1'>https://keybase.io/team/Agorise</p> </a>",
|
"marketing.accordion.promotional_displays1": "<a target='_blank' rel='noopener noreferrer' href='https://keybase.io/team/Agorise' class='list-group-item list-group-item-action flex-column align-items-start'> <div class='d-flex w-100 justify-content-between'> <h5 class='mb-1'> Logos, Advertising images, Stickers and Merchandise, etc. (in the /PalmPay folder) </h5> </div> <p class='mb-1'>https://keybase.io/team/Agorise</p> </a>",
|
||||||
|
|
||||||
"ambassadors.title": "Ambassadors",
|
"ambassadors.title": "Embajadores",
|
||||||
"ambassadors.merchants_link_description": "place of business",
|
"ambassadors.merchants_link_description": "lugar de negocios",
|
||||||
"ambassadors.description1": "PalmPay Ambassadors are located in your city, or very near to you. Their job is to teach topics concerning Cryptocurrencies and Blockchains. Most offer local Meetups and Workshops too. So, if you are interested in these topics and would like to learn more, or even accept Cryptocurrencies at your ",
|
"ambassadors.description1": "Los embajadores de PalmPay están ubicados en su ciudad o muy cerca de usted. Su trabajo es enseñar temas relacionados con las criptomonedas y las cadenas de bloques. La mayoría ofrece también reuniones y talleres locales. Por lo tanto, si está interesado en estos temas y desea obtener más información, o incluso aceptar Cryptocurrencies en su ",
|
||||||
"ambassadors.description2": ", then be sure to contact a PalmPay Ambassador near you. If you are having trouble finding an Ambassador or would like to apply, feel free to <a target='_blank' rel='noopener noreferrer' href='https://t.me/Agorise'>contact us on Telegram</a> any time, we are glad to assist.",
|
"ambassadors.description2": ", entonces asegúrese de contactar a un embajador de PalmPay cerca de usted. Si tiene problemas para encontrar un Embajador o le gustaría presentar una solicitud, no dude en <a target='_blank' rel='noopener noreferrer' href='https://t.me/Agorise'>contáctenos en Telegram</a> cualquier momento, estamos encantados de ayudarle.",
|
||||||
|
|
||||||
"merchants.title": "Merchants",
|
"merchants.title": "Mercantes",
|
||||||
"merchants.ambassadors_link_description": "PalmPay Ambassadors",
|
"merchants.ambassadors_link_description": "Embajadores PalmPay",
|
||||||
"merchants.description1": "PalmPay merchants are the backbone of the new Crypto Economy. If you are looking for businesses that will accept your Cryptocurrency, then just use the Search and Map data below. More merchants will be added here as the ",
|
"merchants.description1": "Los comerciantes de PalmPay son la columna vertebral de la nueva Crypto Economy. Si está buscando negocios que acepten su Cryptocurrency, simplemente use los datos de Búsqueda y Mapa a continuación. Más comerciantes serán agregados aquí como el ",
|
||||||
"merchants.description2": " inform us. If you need help, just <a target='_blank' rel='noopener noreferrer' href='https://t.me/Agorise'>join us on Telegram</a> and we will be glad to assist you."
|
"merchants.description2": " informenos. Si necesitas ayuda, solo <a target='_blank' rel='noopener noreferrer' href='https://t.me/Agorise'>únete a nosotros en Telegram</a> y estaremos encantados de atenderte."
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import feathers from '@feathersjs/client';
|
||||||
const app = feathers();
|
const app = feathers();
|
||||||
// Change to your production ambassador web service
|
// Change to your production ambassador web service
|
||||||
//const restClient = feathers.rest('http://localhost:3030');
|
//const restClient = feathers.rest('http://localhost:3030');
|
||||||
const restClient = feathers.rest('https://intranet.palmpay.io');
|
const restClient = feathers.rest('https://websvc.palmpay.io');
|
||||||
|
|
||||||
// Configure an Fetch AJAX library with that client. For fetch details see https://facebook.github.io/react-native/docs/network.html
|
// Configure an Fetch AJAX library with that client. For fetch details see https://facebook.github.io/react-native/docs/network.html
|
||||||
// For rest details see https://docs.feathersjs.com/api/client/rest.html
|
// For rest details see https://docs.feathersjs.com/api/client/rest.html
|
||||||
|
|
Loading…
Reference in a new issue