Skip to content

Commit

Permalink
coderabbitai suggestion integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmbabhazi committed Oct 18, 2024
1 parent ff38172 commit 434c237
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export class JobSearchAvailabilityEditorComponent extends DefaultEditor implemen

this._toastrService.success(toastrMessageKey, { name: employee.fullName });
} catch (error) {
this._toastrService.danger(error);
const errorMessage = error?.message || 'An error occurred while updating the job search availability.';
this._toastrService.danger(errorMessage);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { Cell, DefaultEditor } from 'angular2-smart-table';

@Component({
Expand All @@ -9,11 +9,20 @@ import { Cell, DefaultEditor } from 'angular2-smart-table';
`
})
export class NonEditableNumberEditorComponent extends DefaultEditor implements OnInit {
cellValue!: string;
cellValue!: string | number;

@Input() cell!: Cell;

ngOnInit() {
this.cellValue = this.cell.getValue();
const value = this.cell.getValue();
if (value === null || value === undefined) {
console.warn('Cell value is null or undefined');
this.cellValue = '';
} else if (typeof value === 'number' || typeof value === 'string') {
this.cellValue = value;
} else {
console.error('Unexpected cell value type:', typeof value);
this.cellValue = '';
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ import { TaskBadgeViewComponentModule } from '../tasks/task-badge-view/task-badg
InvoiceTotalValueComponent,
NotesWithTagsComponent,
NumberEditorComponent,
JobSearchAvailabilityEditorComponent,
NonEditableNumberEditorComponent,
OrganizationWithTagsComponent,
PhoneUrlComponent,
PictureNameTagsComponent,
Expand Down

0 comments on commit 434c237

Please sign in to comment.