Skip to content

Commit

Permalink
Added embargo checkbox
Browse files Browse the repository at this point in the history
Signed-off-by: Amol Sontakke <[email protected]>
  • Loading branch information
amolsontakke3576 committed Dec 11, 2024
2 parents 62fad62 + a144c9a commit ce21e9a
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Once the CLA is signed, the GitHub pull request status is updated.

## Documentation

Please see our [online product documentation](https://docs.linuxfoundation.org/lfx/v/v2/easycla) for a complete product
Please see our [online product documentation](https://docs.linuxfoundation.org/lfx/easycla) for a complete product
overview.

## License
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@
"@fortawesome/fontawesome-free": "^6.4.0",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"@silvermine/serverless-plugin-cloudfront-lambda-edge": "^2.1.1",
"@linuxfoundation/lfx-ui-core": "^0.0.12",
"aws-sdk": "2.1558.0",
"@types/node": "^18.16.0",
"auth0-spa-js": "^1.6.5",
"aws-sdk": "2.1558.0",
"bootstrap": "^4.4.0",
"file-saver": "^2.0.5",
"query-string": "^6.13.8",
Expand Down
1 change: 0 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@
<router-outlet></router-outlet>
</div>
</div>

<lfx-footer></lfx-footer>
9 changes: 2 additions & 7 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
/* Copyright The Linux Foundation and each contributor to CommunityBridge.
SPDX-License-Identifier: MIT */
.fix-header-margin {
transition: margin 0.3s;
margin-top: 35px;
padding: 25px 0;
min-height: calc(100vh - 167px);
&.expanded {
margin-top: 100px;
min-height: calc(100vh - 242px);
}
padding: 25px 0 0 0;
min-height: calc(100vh - 125px);
}

.vcenter-item{
Expand Down
19 changes: 7 additions & 12 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
// To run this project you required node version 12.0.0 or higher, yarn 1.13.0 or higher.

import { Component } from '@angular/core';
import { AppSettings } from './config/app-settings';
import { EnvConfig } from './config/cla-env-utils';
import { environment } from 'src/environments/environment';
import { StorageService } from './shared/services/storage.service';
import { AppSettings } from './config/app-settings';

@Component({
selector: 'app-root',
Expand All @@ -32,10 +31,12 @@ export class AppComponent {
}

ngOnInit() {
// const hasAleadyAcceptedTerms = JSON.parse(
// Added for future use to not show the terms page if the user has already accepted the terms

// const hasAlreadyAcceptedTerms = JSON.parse(
// this.storageService.getItem(AppSettings.ACCEPTED_TERMS)
// );
// if(hasAleadyAcceptedTerms) {
// if(hasAlreadyAcceptedTerms) {
// this.showDashboard = true;
// this.hasTermAccepted = true;
// } else {
Expand All @@ -44,8 +45,7 @@ export class AppComponent {
// }

this.mountHeader();
this.hasExpanded = true;
this.mountFooter();
this.hasExpanded = true;
}

onClickTermAccepted(event:boolean) {
Expand All @@ -55,6 +55,7 @@ export class AppComponent {

onClickContinue() {
if(this.hasTermAccepted) {
this.storageService.setItem(AppSettings.ACCEPTED_TERMS, true);
this.showDashboard = true;
}
}
Expand All @@ -65,10 +66,4 @@ export class AppComponent {
script.setAttribute('async', 'true');
document.head.appendChild(script);
}

private mountFooter(): void {
const script = document.createElement('script');
script.setAttribute('src', EnvConfig.default[AppSettings.LFX_FOOTER]);
document.head.appendChild(script);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class IndividualDashboardComponent implements OnInit {
this.hasGerrit = JSON.parse(this.storageService.getItem(AppSettings.HAS_GERRIT));
this.status = 'Pending';
if (this.hasGerrit) {
this.postIndivdualRequestSignature();
this.postIndividualRequestSignature();
} else {
this.findActiveSignature();
}
Expand All @@ -49,7 +49,7 @@ export class IndividualDashboardComponent implements OnInit {
(response) => {
if (response) {
this.activeSignatureModel = response;
this.postIndivdualRequestSignature();
this.postIndividualRequestSignature();
} else {
this.status = 'Failed';
const error = 'Whoops, It looks like you don\'t have any signatures in progress.' +
Expand All @@ -63,12 +63,13 @@ export class IndividualDashboardComponent implements OnInit {
);
}

postIndivdualRequestSignature() {
postIndividualRequestSignature() {
const redirectUrl = this.storageService.getItem(AppSettings.REDIRECT);
const data = {
project_id: this.projectId,
user_id: this.userId,
return_url_type: this.hasGerrit ? AppSettings.GERRIT :this.claContributorService.getTypeByUrl(),
return_url: this.hasGerrit ? '' : this.activeSignatureModel.return_url
return_url: this.hasGerrit ? redirectUrl || '' : this.activeSignatureModel.return_url
};
this.claContributorService.postIndividualSignatureRequest(data).subscribe(
(response) => {
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import '@linuxfoundation/lfx-ui-core';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

Expand Down
17 changes: 11 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,11 @@
resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b"
integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==

"@linuxfoundation/lfx-ui-core@^0.0.12":
version "0.0.12"
resolved "https://registry.yarnpkg.com/@linuxfoundation/lfx-ui-core/-/lfx-ui-core-0.0.12.tgz#69b89fb82bc3ddc2343f140a87c5c43bae230801"
integrity sha512-yOGk9URri2/Ojp611cCloORO0PuMdjJD8Og6emhLV9+dMvArweTRzLTTOsTAJp7Y1ZtzZA81xMG24nwu/0fyag==

"@ng-bootstrap/ng-bootstrap@^6.1.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-6.2.0.tgz#0506d612ca6002bd8fa398d006fa2641013e11d4"
Expand Down Expand Up @@ -2502,10 +2507,10 @@ available-typed-arrays@^1.0.5:
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==

aws-sdk@2.1363.0:
version "2.1363.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1363.0.tgz#30c3b7fe999ee2ba1103a533ea27e1b0f5708e1f"
integrity sha512-M2MZZXehgi/EMQv5GlzRkn3TlhoOYHg2cYdSAAqhjv67WaEG50MjaQy5vRvfN1i8XvB24aJFJ5pCrx69TaCaIg==
aws-sdk@2.1558.0:
version "2.1558.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1558.0.tgz#e62f58a1ef3886a57b9e524b65541ad6efad0a30"
integrity sha512-lxaPHlLg5EfVK5yg2dAJ1k1BJgxUoTODYk8yMPFAjMwNIN302b8D8XYNucstm7urgiykW3zEtRDeNaX9oc6RQA==
dependencies:
buffer "4.9.2"
events "1.1.1"
Expand All @@ -2516,7 +2521,7 @@ [email protected]:
url "0.10.3"
util "^0.12.4"
uuid "8.0.0"
xml2js "0.5.0"
xml2js "0.6.2"

aws-sdk@^2.1404.0:
version "2.1407.0"
Expand Down Expand Up @@ -11224,7 +11229,7 @@ ws@^6.2.1, ws@^7.5.3, ws@^7.5.5, ws@^7.5.9, ws@~8.11.0:
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591"
integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==

[email protected], xml2js@^0.4.17, xml2js@^0.5.0:
[email protected], xml2js@0.6.2, xml2js@^0.4.17, xml2js@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7"
integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==
Expand Down

0 comments on commit ce21e9a

Please sign in to comment.