Project

General

Profile

« Previous | Next » 

Revision 62266

Added by John Balasis almost 2 years ago

Added lastConsentTermsOfUseDate to Repository class

View differences:

modules/uoa-repository-dashboard-gui/trunk/src/app/domain/typeScriptClasses.ts
133 133
  consentTermsOfUse: boolean;
134 134
  fullTextDownload: boolean;
135 135
  consentTermsOfUseDate: Date;
136
  lastConsentTermsOfUseDate: Date;
136 137
  availableDiskSpace: string;
137 138
  securityParameters: string;
138 139
  protocol: string;
modules/uoa-repository-dashboard-gui/trunk/src/app/shared/reusablecomponents/sources-forms/datasource-update-terms-form.component.ts
80 80
        this.errorMessage = '';
81 81
        this.selectedRepo.consentTermsOfUse = this.agreementForm.value.acceptTerms;
82 82
        this.selectedRepo.fullTextDownload = this.agreementForm.value.textMining;
83
        this.selectedRepo.consentTermsOfUseDate = new Date(Date.now());
83
        if (!this.selectedRepo.consentTermsOfUseDate) {
84
          this.selectedRepo.consentTermsOfUseDate = new Date(Date.now());
85
        }
86
        this.selectedRepo.lastConsentTermsOfUseDate = new Date(Date.now());
84 87
        this.repoService.updateRepository(this.selectedRepo).subscribe(
85 88
          response => {
86 89
            if (response) {

Also available in: Unified diff