Added lastConsentTermsOfUseDate to Repository class
This commit is contained in:
parent
dd3524bc47
commit
13366df06d
|
@ -133,6 +133,7 @@ export class Repository extends DriverResource implements IsSerializable {
|
|||
consentTermsOfUse: boolean;
|
||||
fullTextDownload: boolean;
|
||||
consentTermsOfUseDate: Date;
|
||||
lastConsentTermsOfUseDate: Date;
|
||||
availableDiskSpace: string;
|
||||
securityParameters: string;
|
||||
protocol: string;
|
||||
|
|
|
@ -80,7 +80,10 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
|
|||
this.errorMessage = '';
|
||||
this.selectedRepo.consentTermsOfUse = this.agreementForm.value.acceptTerms;
|
||||
this.selectedRepo.fullTextDownload = this.agreementForm.value.textMining;
|
||||
this.selectedRepo.consentTermsOfUseDate = new Date(Date.now());
|
||||
if (!this.selectedRepo.consentTermsOfUseDate) {
|
||||
this.selectedRepo.consentTermsOfUseDate = new Date(Date.now());
|
||||
}
|
||||
this.selectedRepo.lastConsentTermsOfUseDate = new Date(Date.now());
|
||||
this.repoService.updateRepository(this.selectedRepo).subscribe(
|
||||
response => {
|
||||
if (response) {
|
||||
|
|
Loading…
Reference in New Issue