Compare commits

..

No commits in common. "15bea6826fca2a959134423a032ebb9001fc68d1" and "7a17666e762e91857303cb625c7c8be1fd150fbc" have entirely different histories.

8 changed files with 84 additions and 88 deletions

View file

@ -8,7 +8,6 @@
"@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",
@ -16,6 +15,7 @@
"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",

View file

@ -169,38 +169,37 @@ class EnhancedTable extends Component {
const searchQuery = query; const searchQuery = query;
const searchColumns = this.state.searchColumns; const searchColumns = this.state.searchColumns;
const data = this.filterData(this.props.data, searchQuery, searchColumns); const data = this.props.data.filter((item) => {
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
*/ */
@ -213,11 +212,18 @@ class EnhancedTable extends Component {
isSelected = id => this.state.selected.indexOf(id) !== -1; isSelected = id => this.state.selected.indexOf(id) !== -1;
filterData(data, searchQuery, searchColumns) { render() {
let { data } = this.props;
const { columnData, rowsPerPageOptions, showSearchColumns } = this.props;
const { order, orderBy, selected, rowsPerPage, page, searchQuery, searchColumns } = this.state;
// Logic of search query and columns
if(searchQuery.length > 0) {
// Remove white spaces and wrong "" split // Remove white spaces and wrong "" split
const queryTerms = searchQuery.split(' ').filter(value => value !== ''); const queryTerms = searchQuery.split(' ').filter(value => value !== '');
return data.filter((item) => { data = data.filter((item) => {
const insertArray = []; const insertArray = [];
// Implement hardcoded AND query over each column // Implement hardcoded AND query over each column
@ -255,17 +261,7 @@ class EnhancedTable extends Component {
}); });
} }
render() {
let { data } = this.props;
const { columnData, rowsPerPageOptions, showSearchColumns } = this.props;
const { order, orderBy, selected, rowsPerPage, page, searchQuery, searchColumns } = this.state;
// Logic of search query and columns
if(searchQuery.length > 0) {
data = this.filterData(data, searchQuery, searchColumns);
}
data = this.sortData(data);
return ( return (
<div style={styles.root}> <div style={styles.root}>

View file

@ -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" className="ambs_services"> <section data-spy="scroll" data-target="#mainNav" id="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">

View file

@ -4,7 +4,3 @@
.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;
}

View file

@ -307,6 +307,10 @@ 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 = {

View file

@ -24,7 +24,7 @@ const messages = {
'es': messages_es 'es': messages_es
}; };
const language = 'es'; const language = 'en';
// Add IntlProvider to make the internationalization functions visible in all // Add IntlProvider to make the internationalization functions visible in all
// our components. // our components.

View file

@ -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": "Embajadores", "ambassadors.title": "Ambassadors",
"ambassadors.merchants_link_description": "lugar de negocios", "ambassadors.merchants_link_description": "place of business",
"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.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.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.", "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.",
"merchants.title": "Mercantes", "merchants.title": "Merchants",
"merchants.ambassadors_link_description": "Embajadores PalmPay", "merchants.ambassadors_link_description": "PalmPay Ambassadors",
"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.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.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." "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."
} }

View file

@ -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://websvc.palmpay.io'); const restClient = feathers.rest('https://intranet.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