Skip to content

Commit

Permalink
fix: fIx account rejection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
josephatJ committed May 15, 2024
1 parent c67f295 commit f1f3776
Show file tree
Hide file tree
Showing 4 changed files with 238 additions and 105 deletions.
2 changes: 0 additions & 2 deletions src/app/core/services/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ export class UsersDataService {
: this.httpClient.post(`messageConversations`, data?.messageBody)
).pipe(
switchMap((responses: any[]) => {
console.log('responses:::', responses);
console.log('DATA:::', data);
const userResponse: any = responses[0];
return userResponse
? this.httpClient.post(`messageConversations`, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
.approved-user {
background-color: #e5cd54;
}

.rejected-user {
color: red;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div
*ngIf="{
translations: translations$ | async,
} as params"
translations: translations$ | async,
dataStoreInformation: dataStoreInformation$ | async,
systemSettings: systemSettings$ | async
} as params"
>
<div class="loading-overlay" *ngIf="saving">
<div class="text-center">
Expand All @@ -12,12 +14,10 @@
</div>
</div>

<ng-container
*ngIf="{ dataStoreInformation: dataStoreInformation$ | async } as params"
>
<ng-container>
<mat-progress-bar
mode="indeterminate"
*ngIf="!params?.dataStoreInformation"
*ngIf="!params?.dataStoreInformation || !params?.systemSettings"
></mat-progress-bar>

<h2 mat-dialog-title>
Expand Down Expand Up @@ -105,7 +105,8 @@ <h2 mat-dialog-title>
<tr
[ngClass]="{
'created-user': user?.status == 'CREATED',
'approved-user': user?.status == 'APPROVED'
'approved-user': user?.status == 'APPROVED',
'rejected-user': user?.status === 'REJECTED'
}"
>
<td>
Expand Down Expand Up @@ -166,18 +167,31 @@ <h2 mat-dialog-title>
</tr>
<ng-container
*ngIf="
user?.status === 'CREATED' ||
(user?.status === 'APPROVED' &&
dialogData?.configurations?.useTier2)
user?.status === 'REJECTED' &&
selectedRequestForApproval?.referenceId === user?.referenceId
"
>
<tr>
<td colspan="100%">
{{ user | json }}
<div>
<p>
Status: <b>{{ user?.status }}</b>
</p>
<p>
Reason:
<b>
{{ user?.reason }}
</b>
</p>
</div>
</td>
</tr></ng-container
>
<ng-container *ngIf="user?.status !== 'CREATED'">
<ng-container
*ngIf="
user?.status !== 'CREATED' && user?.status !== 'REJECTED'
"
>
<tr
*ngIf="
((user?.status == 'APPROVED' &&
Expand Down Expand Up @@ -249,7 +263,8 @@ <h2 mat-dialog-title>
checkingForPotentialDuplicates ||
user?.status === 'CREATED' ||
!isCurrentUsernameValid ||
!currentUsername
!currentUsername ||
!params?.systemSettings
"
mat-flat-button
color="primary"
Expand All @@ -258,7 +273,8 @@ <h2 mat-dialog-title>
$event,
user,
params?.dataStoreInformation,
'approve'
'approve',
params?.systemSettings
)
"
>
Expand All @@ -274,7 +290,8 @@ <h2 mat-dialog-title>
*ngIf="dialogData?.isFeedbackRecepient"
[disabled]="
checkingForPotentialDuplicates ||
user?.status === 'CREATED'
user?.status === 'CREATED' ||
!params?.systemSettings
"
mat-flat-button
color="warn"
Expand All @@ -283,7 +300,8 @@ <h2 mat-dialog-title>
$event,
user,
params?.dataStoreInformation,
'reject'
'reject',
params?.systemSettings
)
"
>
Expand Down
Loading

0 comments on commit f1f3776

Please sign in to comment.