Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
808 changes: 533 additions & 275 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"private": true,
"dependencies": {
"@angular-slider/ngx-slider": "^14.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🌐 Web query:

@angular-slider/ngx-slider compatibility with Angular 15

💡 Result:

The @angular-slider/ngx-slider package provides explicit support for Angular 15 [1][2][3]. Specifically, version 15.x of the library is designed to be compatible with Angular 15 and requires RxJS 7.x [1][2][3]. You can verify this compatibility in the official package documentation and the project's changelog, which confirms that the 15.0.0 release was a backport targeting Angular 15 [1][4]. Note that as of May 2026, the maintainers only actively support the latest three versions of the library [1][2].

Citations:


Update @angular-slider/ngx-slider to version 15.x for Angular 15 compatibility.

The current version ^14.0.0 is not compatible with Angular 15. The library provides version 15.x specifically designed for Angular 15 with RxJS 7.x support. Update the dependency to ^15.0.0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 21, Update the package.json dependency for the Angular
slider: replace the current version specifier for "@angular-slider/ngx-slider"
(currently "^14.0.0") with the Angular-15 compatible release "^15.0.0" so the
project uses the library built for Angular 15 / RxJS 7 compatibility; then run
your dependency install (npm/yarn) and verify no breaking peer dependency
warnings.

"@angular/common": "^15.0.0",
"@angular/core": "^15.0.0",
"@angular/forms": "^15.0.0",
Expand Down Expand Up @@ -48,19 +49,18 @@
"@sentry/browser": "^7.92.0",
"@sentry/cli": "^2.24.1",
"@tinymce/tinymce-angular": "^7.0.0",
"algoliasearch": "^4.23.3",
"angular-instantsearch": "^4.4.0",
"algoliasearch": "^5.52.1",
"aws-sdk": "^2.1279.0",
"chart.js": "^4.1.1",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-nativestorage": "^2.3.2",
"date-fns": "^2.29.3",
"file-saver": "^2.0.5",
"instantsearch.js": "^4.97.0",
Comment on lines +52 to +59

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check for v4-only Algolia API usage (expected: no matches):"
rg -nP --type=ts -C2 "\\binitIndex\\s*\\("

echo
echo "Locate Algolia imports and nearby usage:"
rg -nP --type=ts -C2 "from\\s+['\\\"]algoliasearch(?:/lite)?['\\\"]"

echo
echo "Inspect Algolia service wrappers for migrated method patterns:"
fd -i "algolia*.ts" src | xargs -r rg -n -C2 "algoliasearch|initIndex|search\\(|saveObject|saveObjects|deleteIndex|operationIndex"

Repository: BAWES-Universe/studenthub-staff

Length of output: 2941


Migrate Algolia v4 API calls to v5 before applying package upgrade.

The algoliasearch upgrade to v5.52.1 removed the initIndex() method. Three locations still use the deprecated v4-style API and will fail at runtime:

  • src/app/providers/logged-in/algolia.service.ts lines 81 and 96
  • src/app/providers/algolia.service.ts line 11

Replace client.initIndex(indexName) with client.getObject() or appropriate v5 client methods. Refer to Algolia v5 migration guide for the correct method signatures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 52 - 59, Three call sites still use the old
Algolia v4-style client.initIndex(indexName) which is removed in v5; update the
three locations (src/app/providers/logged-in/algolia.service.ts around the uses
at lines ~81 and ~96, and src/app/providers/algolia.service.ts near line ~11) to
use the v5 API: replace client.initIndex(...) usages with the appropriate v5
calls (for retrieving objects use client.getObject / client.getObjects or use
client.index(indexName) and then the index methods for search/save/update as
required) and update any downstream method calls (search, saveObjects,
getObject, etc.) to the v5 signatures—follow the Algolia v5 migration guide to
map each initIndex+operation to the correct v5 client/index method.

"ion2-calendar": "^3.5.0",
"ionicons": "^6.0.3",
"mixpanel-browser": "^2.45.0",
"moment": "^2.30.1",
"ng5-slider": "^1.2.6",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
{{ value.upper | age }}
</ion-label>

<ng5-slider [(value)]="value.lower" [(highValue)]="value.upper"
<ngx-slider [(value)]="value.lower" [(highValue)]="value.upper"
(userChangeEnd)="handleChange()"
(userChange)="setLabel()" [options]="options"></ng5-slider>
(userChange)="setLabel()" [options]="options"></ngx-slider>
<!--
<ion-range debounce="500" dualKnobs="true" (ionChange)="handleChange($event)"
[value]="value"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Component, Input, Inject, forwardRef, EventEmitter, Output, ChangeDetectorRef, Optional } from '@angular/core';
import { connectRange } from 'instantsearch.js/es/connectors';
import { RangeRenderState } from 'instantsearch.js/es/connectors/range/connectRange';
import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch';
import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils';
import { Options } from 'ng5-slider';
import { Component, Input, EventEmitter, Output, ChangeDetectorRef } from '@angular/core';
import { Options } from '@angular-slider/ngx-slider';


@Component({
Expand All @@ -27,7 +23,7 @@ export class AgeRefinementListComponent extends BaseWidget {
@Output() change: EventEmitter<any> = new EventEmitter();


public override state: RangeRenderState = {
public state: RangeRenderState = {
range: {min: 0, max: 1},
refine: noop,
canRefine: null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Ng5SliderModule } from 'ng5-slider';
import { NgxSliderModule } from '@angular-slider/ngx-slider';
import { FormsModule } from '@angular/forms';
import { NgAisModule } from 'angular-instantsearch';
import { IonicModule } from '@ionic/angular';
Expand All @@ -14,11 +14,10 @@ import { AgeRefinementListComponent } from './age-refinement-list.component';
],
imports: [
IonicModule,
NgAisModule,
CommonModule,
FormsModule,
PipesModule,
Ng5SliderModule,
NgxSliderModule,
],
exports: [
AgeRefinementListComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearc
import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils';
import {CalendarModal, CalendarModalOptions, CalendarResult} from 'ion2-calendar';
import { ModalController } from '@ionic/angular';
import {Options} from "ng5-slider";
import {Options} from "@angular-slider/ngx-slider";

@Component({
selector: 'date-range-refinement-list',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
{{ value.upper | age }}
</ion-label>

<ng5-slider [(value)]="value.lower" [(highValue)]="value.upper"
<ngx-slider [(value)]="value.lower" [(highValue)]="value.upper"
(userChangeEnd)="handleChange()"
(userChange)="setLabel()" [options]="options"></ng5-slider>
(userChange)="setLabel()" [options]="options"></ngx-slider>
<!--
<ion-range debounce="500" dualKnobs="true" (ionChange)="handleChange($event)"
[value]="value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FormsModule } from "@angular/forms";
import { RangeRefinementComponent } from './range-refinement-list';

import { NgAisModule } from 'angular-instantsearch';
import { Ng5SliderModule } from 'ng5-slider';
import { NgxSliderModule } from '@angular-slider/ngx-slider';

import { PipesModule } from '../../pipes/pipes.module';

Expand All @@ -21,7 +21,7 @@ import { PipesModule } from '../../pipes/pipes.module';
CommonModule,
FormsModule,
PipesModule,
Ng5SliderModule,
NgxSliderModule,
],
exports: [
RangeRefinementComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Component, Input, Inject, forwardRef, EventEmitter, Output, ChangeDetectorRef, Optional } from '@angular/core';
import { Component, Input, EventEmitter, Output, ChangeDetectorRef } from '@angular/core';
import { connectRange } from 'instantsearch.js/es/connectors';
import { RangeRenderState } from 'instantsearch.js/es/connectors/range/connectRange';
import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch';
import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils';
import { Options } from 'ng5-slider';
import { parseNumberInput, noop } from 'instantsearch.js/es/lib/utils';
import { Options } from '@angular-slider/ngx-slider';


@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { AppliedFiltersModule } from '../../../../components/applied-filters/app
import { LoadingModalModule } from '../../../../components/loading-modal/loading-modal.module';
import { CandidateModule } from '../../../../components/candidate/candidate.module';
import { NoItemsModule } from '../../../../components/no-items/no-items.module';
import { NgAisModule } from 'angular-instantsearch';
// import { NgAisModule } from 'angular-instantsearch';
import { TranslateModule } from '@ngx-translate/core';
import { BawesAisPaginationModuleModule } from 'src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module';

Expand All @@ -23,7 +23,6 @@ import { BawesAisPaginationModuleModule } from 'src/app/components/bawes-ais-pag
CommonModule,
FormsModule,
IonicModule,
NgAisModule,
CandidateFilterModule,
BawesAisPaginationModuleModule,
AppliedFiltersModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
</ion-row>
</ion-grid>

<ais-instantsearch #instantSearch *ngIf="instantSearchConfig" [config]="instantSearchConfig">
<!-- Manual Search Implementation -->
<div *ngIf="instantSearchConfig" class="manual-search-container">
<ion-grid>
<ion-row [class.filter-closed]="!showFilter" [class.filter-opened]="showFilter">

Expand Down Expand Up @@ -114,7 +115,7 @@
</ion-col>
</ion-row>
</ion-grid>
</ais-instantsearch>
</div>
</div>
</ion-content>
<ion-footer class="ion-no-border" *ngIf="showFilter || candidateService.candidates.length > 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { NavController, Platform, MenuController, PopoverController, IonContent,
import { environment } from '../../../../../environments/environment';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import algoliasearch from 'algoliasearch/index';
// import algoliasearch from 'algoliasearch/index';
import * as VERSION from 'algoliasearch-helper/src/version';
import * as encodeProxy from 'querystring-es3/encode';
import * as encodeProxy from 'querystring-es3';
Comment on lines +7 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify unresolved symbol risk in this file
rg -n "algoliasearch\\(" src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts
rg -n "import\\s+algoliasearch" src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts

Repository: BAWES-Universe/studenthub-staff

Length of output: 183


🏁 Script executed:

cat -n src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts | head -50

Repository: BAWES-Universe/studenthub-staff

Length of output: 2326


🏁 Script executed:

cat -n src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts | sed -n '320,340p'

Repository: BAWES-Universe/studenthub-staff

Length of output: 947


🏁 Script executed:

rg -n "algoliasearch" src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts

Repository: BAWES-Universe/studenthub-staff

Length of output: 246


algoliasearch is used but its import is commented out, causing a compilation failure.

Line 7 comments out the import, but algoliasearch() is called at line 330, resulting in Cannot find name 'algoliasearch' error.

Uncomment and update the import path:

Fix
-// import algoliasearch from 'algoliasearch/index';
+import algoliasearch from 'algoliasearch/lite';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// import algoliasearch from 'algoliasearch/index';
import * as VERSION from 'algoliasearch-helper/src/version';
import * as encodeProxy from 'querystring-es3/encode';
import * as encodeProxy from 'querystring-es3';
import algoliasearch from 'algoliasearch/lite';
import * as VERSION from 'algoliasearch-helper/src/version';
import * as encodeProxy from 'querystring-es3';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts`
around lines 7 - 9, Uncomment and restore the Algolia client import so the
algoliasearch() call resolves: add a proper default import like import
algoliasearch from 'algoliasearch' (or the appropriate package entry your
project uses) at the top of the file where the commented line currently is,
replacing the commented // import algoliasearch... line so calls to
algoliasearch() in this module (e.g., the function that initializes the client)
compile correctly.

// service
import { AuthService } from '../../../../providers/auth.service';
import { CandidateService } from '../../../../providers/logged-in/candidate.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FulltimerSearchPage } from './fulltimer-search.page';
import { AppliedFiltersModule } from '../../../../components/applied-filters/applied-filters.module';
import { LoadingModalModule } from '../../../../components/loading-modal/loading-modal.module';
import { NoItemsModule } from '../../../../components/no-items/no-items.module';
import { NgAisModule } from 'angular-instantsearch';
// import { NgAisModule } from 'angular-instantsearch';
import { FulltimerFilterModule } from 'src/app/components/fulltimer-filter/fulltimer-filter.module';
import { BawesAisPaginationModuleModule } from 'src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module';
import { TranslateModule } from '@ngx-translate/core';
Expand All @@ -23,7 +23,6 @@ import { TranslateModule } from '@ngx-translate/core';
IonicModule,
FulltimerSearchPageRoutingModule,
BawesAisPaginationModuleModule,
NgAisModule,
FulltimerFilterModule,
AppliedFiltersModule,
LoadingModalModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NavController, Platform, MenuController, PopoverController, IonContent,
import { environment } from '../../../../../environments/environment';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import algoliasearch from 'algoliasearch';
// import algoliasearch from 'algoliasearch';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify unresolved symbol risk in this file
rg -n "algoliasearch\\(" src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts
rg -n "import\\s+algoliasearch" src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts

Repository: BAWES-Universe/studenthub-staff

Length of output: 177


Uncomment algoliasearch import to fix compile error.

The algoliasearch(...) function is invoked at line 258, but the import is commented out at line 6. Uncomment the import and use the /lite variant:

Fix
-// import algoliasearch from 'algoliasearch';
+import algoliasearch from 'algoliasearch/lite';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// import algoliasearch from 'algoliasearch';
import algoliasearch from 'algoliasearch/lite';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts`
at line 6, Uncomment and restore the Algolia import so the algoliasearch(...)
call used in FulltimerSearchPage (seen at the invocation in
fulltimer-search.page.ts around the algoliasearch(...) call) compiles: replace
the commented import with the lite client import (import algoliasearch from
'algoliasearch/lite') so the algoliasearch symbol is available for the existing
initialization code in this file.

import * as VERSION from 'algoliasearch-helper/src/version';
import * as encodeProxy from 'querystring-es3/encode';
// service
Expand Down
13 changes: 13 additions & 0 deletions src/app/providers/algolia.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Injectable } from '@angular/core';
import algoliasearch from 'algoliasearch/lite';
import instantsearch from 'instantsearch.js';
import { environment } from '../../environments/environment';

@Injectable({ providedIn: 'root' })
export class AlgoliaService {
readonly client = algoliasearch(environment.algoliaAppId, environment.algoliaSearchKey);

createIndex(indexName: string) {
return this.client.initIndex(indexName);
Comment on lines +10 to +11

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Algolia JavaScript API client v5 migration: is client.initIndex() removed, and what is the recommended replacement pattern?

💡 Result:

Yes, the client.initIndex() method has been removed in the Algolia JavaScript API client v5 [1]. In version 5, the client architecture has been updated to be more consistent and aligned with generated OpenAPI specifications [1]. Instead of creating an intermediate index object via initIndex(), all API methods are now called directly on the client instance [2][1]. The recommended replacement pattern is to call the desired method directly on the client and pass the indexName as a parameter [2][1]. For example, if you previously used: // version 4 const client = algoliasearch("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"); const index = client.initIndex("ALGOLIA_INDEX_NAME"); const results = index.search("QUERY"); You should now use: // version 5 const client = algoliasearch("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"); const results = await client.searchSingleIndex({ indexName: "ALGOLIA_INDEX_NAME", searchParams: { query: "QUERY" }, }); To migrate your codebase, it is recommended to search for all occurrences of initIndex or .initIndex( and replace them with the corresponding direct client method calls that include the indexName parameter [1].

Citations:


🏁 Script executed:

# Check package.json for algoliasearch version
cat package.json | grep -A 2 -B 2 "algoliasearch"

Repository: BAWES-Universe/studenthub-staff

Length of output: 233


🏁 Script executed:

# Read the full algolia.service.ts file
cat -n src/app/providers/algolia.service.ts

Repository: BAWES-Universe/studenthub-staff

Length of output: 610


🏁 Script executed:

# Search for usages of createIndex method
rg "createIndex" --type ts --type js -B 2 -A 2

Repository: BAWES-Universe/studenthub-staff

Length of output: 436


🏁 Script executed:

# Search for actual usages/calls to createIndex method
rg "\.createIndex\(" --type ts --type js -B 2 -A 2

Repository: BAWES-Universe/studenthub-staff

Length of output: 57


🏁 Script executed:

# Also search for AlgoliaService usage patterns
rg "AlgoliaService" --type ts --type js -B 2 -A 2

Repository: BAWES-Universe/studenthub-staff

Length of output: 4212


client.initIndex() removed in algoliasearch v5—method will fail at runtime.

The package uses algoliasearch v5.52.1, which removed initIndex() in favor of direct client method calls. This method must be migrated to call client methods directly with indexName as a parameter (e.g., client.searchSingleIndex({ indexName, ... })).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/providers/algolia.service.ts` around lines 10 - 11, The createIndex
method currently calls removed client.initIndex(indexName); update it to use the
Algolia v5 client API by replacing the initIndex call with the direct client
index operation (e.g., use this.client.index(indexName) or the appropriate
client method that accepts indexName as a parameter) so createIndex(indexName:
string) returns the new index object; adjust any code that expects the old
initIndex return shape if needed.

}
}
10 changes: 5 additions & 5 deletions src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,13 @@ ion-calendar-modal {
margin: 0 auto !important;
}

ng5-slider {
ngx-slider {
$handleSize: 12px;

background: var(--ion-color-custom-2) !important;
margin: 10px 0 15px !important;

.ng5-slider-pointer {
.ngx-slider-pointer {
width: 12px !important;
height: 12px !important;
top: -4px !important;
Expand All @@ -451,11 +451,11 @@ ng5-slider {
}
}

.ng5-slider-selection {
.ngx-slider-selection {
background: var(--ion-color-custom-3) !important;
}

.ng5-slider-bubble {
.ngx-slider-bubble {
display: none !important;
}
}
Expand Down Expand Up @@ -850,4 +850,4 @@ ion-content {

.popover-job-search-status {
--width: 309px;
}
}
1 change: 1 addition & 0 deletions tt-metal
Submodule tt-metal added at 0aa21b