Skip to content

Commit

Permalink
Block/Unblock Page Improvements (#885)
Browse files Browse the repository at this point in the history
* Added Radio Buttons

* Optimized Queries

* Optimized Query and Added Last Name Filter

* Radio Button Working

* Added Translations

* Fixed Filter Name

* Fixed Debounce

* Fixed Asynchronous Debounce

* Added Tests

* Better Error and Loading State Handline

* Fixed Loader

* Fixed Loader

* Modulrised Mock Data

* Minor Change

* Fixed Tests

* Increase Coverage

* User query replaced with OrgMemberConnection

* Fixed Tests

* Code Coverage Increase

* Code Cov

* Fixed Translations

* Fixed Failing Tests
  • Loading branch information
prathamesh-mutkure authored May 8, 2023
1 parent b3d7cce commit e22b3cb
Show file tree
Hide file tree
Showing 9 changed files with 626 additions and 199 deletions.
6 changes: 5 additions & 1 deletion public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@
"orgName": "Enter Name",
"blockedSuccessfully": "User blocked successfully",
"Un-BlockedSuccessfully": "User Un-Blocked successfully",
"talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too."
"talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too.",
"allMembers": "All Members",
"blockedUsers": "Blocked Users",
"searchFirstName": "Enter First Name",
"searchLastName": "Enter Last Name"
},
"forgotPassword": {
"title": "Talawa Forgot Password",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@
"orgName": "Entrez le nom",
"blockedSuccessfully": "Utilisateur bloqué avec succès",
"Un-BlockedSuccessfully": "Utilisateur débloqué avec succès",
"talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau."
"talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau.",
"allMembers": "Tous les membres",
"blockedUsers": "Utilisateurs bloqués",
"searchFirstName": "Entrez votre prénom",
"searchLastName": "Entrer le nom de famille"
},
"forgotPassword": {
"title": "Mot de passe oublié Talawa",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@
"orgName": "नाम दर्ज करें",
"blockedSuccessfully": "उपयोगकर्ता को सफलतापूर्वक अवरोधित किया गया",
"Un-BlockedSuccessfully": "उपयोगकर्ता अन-ब्लॉक किया गया सफलतापूर्वक",
"talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।"
"talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।",
"allMembers": "सभी सदस्य",
"blockedUsers": "रोके गए उपयोगकर्ता",
"searchFirstName": "प्रथम नाम दर्ज करें",
"searchLastName": "अंतिम नाम दर्ज करो"
},
"forgotPassword": {
"title": "तलवा पासवर्ड भूल गए",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@
"orgName": "Ingrese su nombre",
"blockedSuccessfully": "Usuario bloqueado con éxito",
"Un-BlockedSuccessfully": "Usuario desbloqueado con éxito",
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red."
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red.",
"allMembers": "Todos los miembros",
"blockedUsers": "Usuarios bloqueados",
"searchFirstName": "Ingrese el nombre",
"searchLastName": "Introduzca el apellido"
},
"forgotPassword": {
"title": "Talawa olvidó su contraseña",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@
"orgName": "輸入名字",
"blockedSuccessfully": "用戶被成功阻止",
"Un-BlockedSuccessfully": "用戶解封成功",
"talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。"
"talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。",
"allMembers": "所有成员",
"blockedUsers": "被阻止的用户",
"searchFirstName": "输入名字",
"searchLastName": "输入姓氏"
},
"forgotPassword": {
"title": "塔拉瓦忘記密碼",
Expand Down
29 changes: 29 additions & 0 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,35 @@ export const MEMBERS_LIST = gql`
image
email
createdAt
organizationsBlockedBy {
_id
}
}
}
}
`;

export const BLOCK_PAGE_MEMBER_LIST = gql`
query Organizations(
$orgId: ID!
$firstName_contains: String
$lastName_contains: String
) {
organizationsMemberConnection(
orgId: $orgId
where: {
firstName_contains: $firstName_contains
lastName_contains: $lastName_contains
}
) {
edges {
_id
firstName
lastName
email
organizationsBlockedBy {
_id
}
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions src/screens/BlockUser/BlockUser.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@
justify-content: space-between;
}

.radio_buttons {
color: #707070;
font-weight: 600;
font-size: 14px;
}
.radio_buttons > input {
transform: scale(1.2);
}
.radio_buttons > label {
margin-top: -4px;
margin-left: 5px;
margin-right: 15px;
}

.loader {
text-align: center;
}

@media screen and (max-width: 575.5px) {
.justifysp {
padding-left: 55px;
Expand Down
Loading

0 comments on commit e22b3cb

Please sign in to comment.