Skip to content

Commit

Permalink
Sprint 30 (#493)
Browse files Browse the repository at this point in the history
* Resolves #357

* Resolves #474
  • Loading branch information
raschdiaz committed Nov 10, 2020
1 parent 4c52a14 commit f4916ba
Show file tree
Hide file tree
Showing 24 changed files with 454 additions and 238 deletions.
80 changes: 41 additions & 39 deletions components/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ class SearchBar extends React.Component {
};

renderSectionContent = (section, index, isActive, sections) => {
let content = this.props.filterConfig.filters.filter(
(filter) => filter.tab === section.key && !filter.type,
);
let content = this.props.filterConfig.filters.filter((filter) => filter.tab === section.key);
return (
<View
key={index}
Expand All @@ -206,45 +204,49 @@ class SearchBar extends React.Component {
borderColor: Colors.grayLight,
padding: 15,
}}>
{content.map((filter) => (
<TouchableOpacity
key={filter.ID}
activeOpacity={0.5}
onPress={() => {
this.filterByOption(filter.ID, filter.query, filter.name);
}}>
<View
style={{
flexDirection: 'row',
height: 50,
paddingLeft: filter.subfilter ? 20 : 0,
{content.length > 0 ? (
content.map((filter) => (
<TouchableOpacity
key={filter.ID}
activeOpacity={0.5}
onPress={() => {
this.filterByOption(filter.ID, filter.query, filter.name);
}}>
<CheckBox
Component={TouchableWithoutFeedback}
checked={filter.ID === this.state.filter.ID}
checkedIcon="dot-circle-o"
uncheckedIcon="circle-o"
containerStyle={{
padding: 0,
margin: 0,
}}
/>
<Text
<View
style={{
paddingTop: Platform.OS === 'ios' ? 4 : 0,
flexDirection: 'row',
height: 50,
paddingLeft: filter.subfilter ? 20 : 0,
}}>
{filter.name}
</Text>
<Text
style={{
marginLeft: 'auto',
paddingTop: Platform.OS === 'ios' ? 4 : 0,
}}>
{filter.count}
</Text>
</View>
</TouchableOpacity>
))}
<CheckBox
Component={TouchableWithoutFeedback}
checked={filter.ID === this.state.filter.ID}
checkedIcon="dot-circle-o"
uncheckedIcon="circle-o"
containerStyle={{
padding: 0,
margin: 0,
}}
/>
<Text
style={{
paddingTop: Platform.OS === 'ios' ? 4 : 0,
}}>
{filter.name}
</Text>
<Text
style={{
marginLeft: 'auto',
paddingTop: Platform.OS === 'ios' ? 4 : 0,
}}>
{filter.count}
</Text>
</View>
</TouchableOpacity>
))
) : (
<Text>{i18n.t('global.noFilters')}</Text>
)}
</View>
);
};
Expand Down
6 changes: 4 additions & 2 deletions languages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "إرسال",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "رقم التعريف الشخصي غير صحيح",
"savedPinCode": "تم حفظ رمز PIN بنجاح",
"removedPinCode": "تمت إزالة رمز PIN بنجاح",
"close": "قريب"
"close": "قريب",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "إضافة جهة اتصال جديدة",
Expand Down
6 changes: 4 additions & 2 deletions languages/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "ভুল পিন",
"savedPinCode": "পিন কোড সাফল্যের সাথে সংরক্ষিত হয়েছে",
"removedPinCode": "পিন কোড সফলভাবে সরানো হয়েছে",
"close": "বন্ধ"
"close": "বন্ধ",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "নতুন পরিচিতি যোগ করুন",
Expand Down
6 changes: 4 additions & 2 deletions languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "Submit",
"share": "Share",
"shareSettings": "Share settings",
"searchUsers": "Search Users"
"searchUsers": "Search Users",
"noFilters": "No filters"
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Incorrect PIN",
"savedPinCode": "PIN code saved successfully!.",
"removedPinCode": "PIN code removed successfully!.",
"close": "Close"
"close": "Close",
"confirmPin": "Confirm the new PIN"
},
"contactDetailScreen": {
"addNewContact": "Add New Contact",
Expand Down
6 changes: 4 additions & 2 deletions languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "Enviar",
"share": "Compartir",
"shareSettings": "Compartir Configuraciones",
"searchUsers": "Buscar usuarios"
"searchUsers": "Buscar usuarios",
"noFilters": "No hay filtros"
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "PIN incorrecto",
"savedPinCode": "El código PIN se ha guardado correctamente!.",
"removedPinCode": "El código PIN se ha removido correctamente!.",
"close": "Cerrar"
"close": "Cerrar",
"confirmPin": "Confirme el nuevo PIN"
},
"contactDetailScreen": {
"addNewContact": "Crear contacto",
Expand Down
6 changes: 4 additions & 2 deletions languages/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "پین نادرست",
"savedPinCode": "کد پین با موفقیت ذخیره شد",
"removedPinCode": "کد پین با موفقیت حذف شد",
"close": "نزدیک"
"close": "نزدیک",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "مخاطب جدید اضافه کنید",
Expand Down
6 changes: 4 additions & 2 deletions languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "PIN incorrect",
"savedPinCode": "Code PIN enregistré avec succès",
"removedPinCode": "Code PIN supprimé avec succès",
"close": "Fermer"
"close": "Fermer",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Ajouter un nouveau contact",
Expand Down
6 changes: 4 additions & 2 deletions languages/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Neispravan PIN",
"savedPinCode": "PIN kod je uspješno spremljen",
"removedPinCode": "PIN kod je uspješno uklonjen",
"close": "Zatvoriti"
"close": "Zatvoriti",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Dodaj novi kontakt",
Expand Down
6 changes: 4 additions & 2 deletions languages/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "PIN salah",
"savedPinCode": "Kode PIN berhasil disimpan",
"removedPinCode": "Kode PIN berhasil dihapus",
"close": "Menutup"
"close": "Menutup",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Tambahkan Kontak Baru",
Expand Down
6 changes: 4 additions & 2 deletions languages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Onjuiste pincode",
"savedPinCode": "PIN-code succesvol opgeslagen",
"removedPinCode": "PIN-code succesvol verwijderd",
"close": "Dichtbij"
"close": "Dichtbij",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Voeg nieuw contact toe",
Expand Down
6 changes: 4 additions & 2 deletions languages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "PIN incorreto",
"savedPinCode": "Código PIN salvo com sucesso",
"removedPinCode": "Código PIN removido com sucesso",
"close": "Perto"
"close": "Perto",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Adicionar novo contato",
Expand Down
6 changes: 4 additions & 2 deletions languages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Неверный PIN-код",
"savedPinCode": "PIN-код успешно сохранен",
"removedPinCode": "PIN-код успешно удален",
"close": "близко"
"close": "близко",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Добавить новый контакт",
Expand Down
6 changes: 4 additions & 2 deletions languages/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Napačna koda PIN",
"savedPinCode": "Koda PIN je bila uspešno shranjena",
"removedPinCode": "Koda PIN je bila uspešno odstranjena",
"close": "Zapri"
"close": "Zapri",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Dodaj nov stik",
Expand Down
6 changes: 4 additions & 2 deletions languages/sr.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Нетачан ПИН",
"savedPinCode": "ПИН код је успешно сачуван",
"removedPinCode": "ПИН код је успешно уклоњен",
"close": "Близу"
"close": "Близу",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Додај нови контакт",
Expand Down
6 changes: 4 additions & 2 deletions languages/sw.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "PIN isiyo sahihi",
"savedPinCode": "Nambari ya siri imehifadhiwa kwa mafanikio",
"removedPinCode": "Nambari ya siri imeondolewa kwa mafanikio",
"close": "Funga"
"close": "Funga",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Ongeza Mawasiliano Mpya",
Expand Down
6 changes: 4 additions & 2 deletions languages/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"submit": "",
"share": "",
"shareSettings": "",
"searchUsers": ""
"searchUsers": "",
"noFilters": ""
},
"loginScreen": {
"domain": {
Expand Down Expand Up @@ -89,7 +90,8 @@
"incorrectPin": "Yanlış PIN",
"savedPinCode": "PIN kodu başarıyla kaydedildi",
"removedPinCode": "PIN kodu başarıyla kaldırıldı",
"close": "Kapat"
"close": "Kapat",
"confirmPin": ""
},
"contactDetailScreen": {
"addNewContact": "Yeni bağlantı ekle",
Expand Down
Loading

0 comments on commit f4916ba

Please sign in to comment.