working #8

Merged
derek merged 11 commits from working into main 2025-07-30 21:04:19 -07:00
Showing only changes of commit dda7077e74 - Show all commits
@@ -16,27 +16,26 @@ import { Authentication } from 'app/services/Authentication';
export class CompanyJobsComponent { export class CompanyJobsComponent {
public MyJobListings: JobListing[] = []; public MyJobListings: JobListing[] = [];
public JobListingPage: JobListing[] = [];
public ErrorMsg: string = ""; public ErrorMsg: string = "";
public Page: number = 1;
constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) { constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) {
this.title.setTitle("Company - Jobs | BoredCareers"); this.title.setTitle("Company - Jobs | BoredCareers");
if (this.Page == 1){ this.route.queryParams.subscribe(params => {
const companyID = params['CompanyID'];
} if (companyID){
http.get<JobListing[]>("api/joblisting/company?CompanyID=" + companyID).subscribe({
http.get<JobListing[]>("api/joblisting?PageQuantity=" + 10 + "&Page=" + 1).subscribe({ next: data => {
next: data => { this.MyJobListings = data;
this.JobListingPage = data; },
}, error: err => {
error: err => { this.ErrorMsg = err.error;
this.ErrorMsg = err.error; }
} });
}); }else{
router.navigate(["/company"]);
}
});
}; };
RemoveJobListing( JobListingID: number ){ RemoveJobListing( JobListingID: number ){