Skip to content

Commit

Permalink
fix invalid & no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
c1495616js committed Oct 18, 2024
1 parent 05bbbc2 commit baaa457
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/admin/admin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class AdminService {
!v.countryOfEducation &&
!v.message
) {
v.message = 'No updates';
v.message = 'No changes';
}

v.valid = !v.message;
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/admin/BccnmNcasPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export const BccnmNcasPreview = ({ data }: { data: BccnmNcasValidation[] }) => {
switch (filter) {
case FilterOption.VALID:
setFilteredData(data.filter(e => e.valid));
break;
case FilterOption.NO_CHANGES:
setFilteredData(data.filter(e => !e.valid && e.message === 'No changes'));
break;
case FilterOption.INVALID:
setFilteredData(data.filter(e => !e.valid));
break;
case FilterOption.NO_CHANGES:
setFilteredData(data.filter(e => e.valid && e.message === 'No changes'));
setFilteredData(data.filter(e => !e.valid && e.message !== 'No changes'));
break;
default:
setFilteredData(data);
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/admin/BccnmNcasUpdateFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export const BccnmNcasUpdateFilter = ({ data, onChange }: BccnmNcasUpdateSummary
switch (option) {
case FilterOption.VALID:
return data.filter(e => e.valid).length;
case FilterOption.INVALID:
return data.filter(e => !e.valid).length;
case FilterOption.NO_CHANGES:
return data.filter(e => e.valid && e.message === 'No changes').length;
return data.filter(e => !e.valid && e.message === 'No changes').length;
case FilterOption.INVALID:
return data.filter(e => !e.valid && e.message !== 'No changes').length;
default:
return data.length;
}
Expand Down

0 comments on commit baaa457

Please sign in to comment.