Skip to content

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jessewashburn committed Nov 15, 2024
1 parent 8ef52ed commit ba585fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/courses/add-courses/courses-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class CoursesAddComponent implements OnInit, OnDestroy {
this.setDocumentInfo(saved);
this.pageType = 'Edit';
} else {
this.pageType = 'Add';
this.pageType = 'Add';
}
const doc = draft === undefined ? saved : draft;
this.setInitialTags(tags, this.documentInfo, draft);
Expand Down
2 changes: 1 addition & 1 deletion src/app/resources/resources-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class ResourcesAddComponent implements OnInit {
console.log(error);
});
} else {
this.pageType = 'Add';
this.pageType = 'Add';
}

this.filteredZipFiles = this.resourceForm.controls.openWhichFile.valueChanges
Expand Down
5 changes: 3 additions & 2 deletions src/app/shared/table-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const filterSpecificFields = (filterFields: string[]): any => {
const normalizedFilter = filter.trim().toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '');
for (let i = 0; i < filterFields.length; i++) {
const fieldValue = getProperty(data, filterFields[i]);
if (typeof fieldValue === 'string' &&
if (typeof fieldValue === 'string' &&
fieldValue.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '').indexOf(normalizedFilter) > -1) {
return true;
}
Expand All @@ -47,7 +47,8 @@ export const filterSpecificFields = (filterFields: string[]): any => {

export const filterSpecificFieldsByWord = (filterFields: string[]): any => {
return (data: any, filter: string) => {
const words = filter.split(' ').map(value => value.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '')); // Normalize each word
// Normalize each word
const words = filter.split(' ').map(value => value.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''));
return words.every(word => {
return filterFields.some(field => {
const fieldValue = getProperty(data, field);
Expand Down

0 comments on commit ba585fc

Please sign in to comment.