Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error view-records.componet.ts #82

Open
ehallein opened this issue Sep 26, 2019 · 2 comments
Open

Compile error view-records.componet.ts #82

ehallein opened this issue Sep 26, 2019 · 2 comments

Comments

@ehallein
Copy link

ehallein commented Sep 26, 2019

Using a fresh close of the repository I get a compile error when running the app:
ERROR in src/app/pages/data-view-export/view-records/view-records.component.ts(200,54): error TS2554: Expected 0-5 arguments, but got 7.

view-records.components.ts calls this on on line 200:

  const exportObservable: Observable<object> = this.apiService.exportRecords(this.dateStart, this.dateEnd,
            this.speciesName, this.selectedDataset.id, this.fileType, this.validatedOnly, this.includeLocked);

Looking at line 653 in src/app/biosys-core/services/api.service.ts I can see exportRecords() only takes 5 parameters:

public exportRecords(startDate?: Date, endDate?: Date, speciesName?: string, datasetId?: number,
                         format: string = 'csv'): Observable<Blob> 

I have removed the last 2 parameters from the initial call in view-records.component.ts and everything seems to be working fine:

const exportObservable: Observable<object> = this.apiService.exportRecords(this.dateStart, this.dateEnd,
            this.speciesName, this.selectedDataset.id, this.fileType);

Is there an outdated file in the repository or has a change not been yet been fully implemented?

@serge-gaia
Copy link
Contributor

Thanks for pointing that out @ehallein.
It looks like a version mismatch with the git submodule biosy-core (https://github.com/gaiaresources/biosys-core) where the API service is.
This project should use the the angular_6 branch of the repo with the 7 arguments, not the master
https://github.com/gaiaresources/biosys-core/tree/angular_6
Have you try to do a:
git submodule update --remote --recursive
I'll check what version of the submodule is set.

@ehallein
Copy link
Author

git submodule update --remote --recursive solved the problem, 7 arguments are working.
thanks @serge-gaia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants