Skip to content

Commit

Permalink
Merge pull request #445 from sinfo/fix-promote
Browse files Browse the repository at this point in the history
fix promote
  • Loading branch information
andreromao authored Apr 14, 2024
2 parents 5b22eea + 432eee5 commit 0c1f6cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
]
},
"staging": {
"optimization": true,
"optimization": false,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"buildOptimizer": false,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/app/user/promote/promote.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ <h5 *ngIf="info && info.length > 0 && info !== 'team'" class='name center'>
<div class="col-sm-6 promote typeahead">
<mat-form-field appearance="fill" style="width: 100%; background-color: white;">
<mat-label>Search for company</mat-label>
<mat-select name="searchCompany" id="searchCompany" name="searchCompany">
<mat-select name="searchCompany" id="searchCompany" name="searchCompany" [(ngModel)]="searchedCompany">
<input (keyup)="onKey($event.target.value)" style="width: 100%;">
<mat-option *ngFor="let comp of selectedCompanies" [value]="comp.name">
<mat-option *ngFor="let comp of selectedCompanies" [value]="comp">
{{ comp.name }}
</mat-option>
</mat-select>
Expand Down
6 changes: 3 additions & 3 deletions src/app/user/promote/promote.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ export class PromoteComponent implements OnInit {
}

onKey(value) {
this.selectedCompanies = this.search(value);
this.selectedCompanies = this.search(value.name);
}

search(value: string) {
let filter = value.toLowerCase();
search(value: Company) {
let filter = value.name.toLowerCase();
return this.companies.filter(comp => comp.name.toLowerCase().includes(filter));
}
}
3 changes: 2 additions & 1 deletion src/environments/environment.dev.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const environment = {
production: true,
cannonUrl: 'https://cannon-staging.sinfo.org',
//cannonUrl: 'https://cannon-staging.sinfo.org',
cannonUrl: 'http://localhost:8090',
url_to_id: {
'28-sinfo': '28-sinfo',
'27-sinfo': '27-sinfo',
Expand Down

0 comments on commit 0c1f6cb

Please sign in to comment.