Added lastConsentTermsOfUseDate to Repository class

This commit is contained in:
John Balasis 2022-05-23 13:16:06 +00:00
parent dd3524bc47
commit 13366df06d
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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) {