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

PRO-6172-Staging #469

Open
wants to merge 91 commits into
base: PRO-6172
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
ecbcfc8
Merge pull request #386 from civis-vote/PRO-377
gpalsingh Jun 5, 2023
4874010
Merge pull request #387 from civis-vote/PRO-377
gpalsingh Jun 6, 2023
9c1d292
Merge pull request #388 from civis-vote/PRO-377
gpalsingh Jun 7, 2023
f212d73
Merge pull request #389 from civis-vote/PRO-377
gpalsingh Jun 7, 2023
8caf9bc
Merge pull request #390 from civis-vote/PRO-377
gpalsingh Jun 9, 2023
e9159ee
Merge pull request #392 from civis-vote/PRO-816
gpalsingh Jun 26, 2023
6f538a7
Merge pull request #394 from civis-vote/PRO-844
gpalsingh Jul 4, 2023
8b7787b
Merge pull request #396 from civis-vote/PRO-985
gpalsingh Jul 19, 2023
9e24667
Merge pull request #398 from civis-vote/PRO-986
gpalsingh Jul 19, 2023
fc3cfe8
Merge pull request #400 from civis-vote/PRO-1194
gpalsingh Aug 4, 2023
b8db7b3
feat: About us changes
barath46 Dec 7, 2023
35e0576
Merge pull request #404 from civis-vote/PRO-2530
barath46 Dec 7, 2023
96a09f4
fix: Team section improvements
barath46 Dec 8, 2023
a7624d2
Merge pull request #405 from civis-vote/PRO-2530
barath46 Dec 8, 2023
9907bdf
fix: Team layout change
barath46 Dec 8, 2023
2702420
Merge pull request #406 from civis-vote/PRO-2530
barath46 Dec 8, 2023
e7584fa
fix: Full names added to team members
barath46 Dec 8, 2023
49db114
Merge pull request #407 from civis-vote/PRO-2530
barath46 Dec 8, 2023
8e1af18
feat: add google translate widget
sehgxl Jan 4, 2024
1889ceb
chore: remove console logs
sehgxl Jan 5, 2024
44e2543
feat: change the position of the widget to the right
sehgxl Jan 5, 2024
f23a108
Merge pull request #411 from civis-vote/PRO-2685
sehgxl Jan 5, 2024
7446c3c
chore: place the google translate script tag just before the closing …
sehgxl Jan 7, 2024
903ab02
Merge pull request #412 from civis-vote/PRO-2685
sehgxl Jan 7, 2024
265ff85
fix: add script tag and div tag in the same file
sehgxl Jan 8, 2024
7f073b5
Merge pull request #413 from civis-vote/PRO-2685
sehgxl Jan 8, 2024
16915bc
fix: avoid using inline script tags to fix csp
sehgxl Jan 10, 2024
7257cb4
Merge pull request #414 from civis-vote/PRO-2685
sehgxl Jan 10, 2024
5834e78
fix: add google translate url to script src in the custom headers
sehgxl Jan 10, 2024
3587fa7
Merge pull request #415 from civis-vote/PRO-2685
sehgxl Jan 10, 2024
366b759
fix: add nonce value for the script tag
sehgxl Jan 10, 2024
a793c56
Merge pull request #416 from civis-vote/PRO-2685
sehgxl Jan 10, 2024
f536129
chore: move script to index.html
sehgxl Jan 15, 2024
0c58ce0
Merge pull request #417 from civis-vote/PRO-2685
sehgxl Jan 15, 2024
5160c91
fix: add nonce value to the script tag
sehgxl Jan 15, 2024
b5737fa
Merge pull request #418 from civis-vote/PRO-2685
sehgxl Jan 15, 2024
2f915c0
chore: move the script tags at the end of body tag
sehgxl Jan 15, 2024
5c9144d
Merge pull request #419 from civis-vote/PRO-2685
sehgxl Jan 15, 2024
b757865
fix: avoid using inline script
sehgxl Jan 19, 2024
756f4c8
Merge pull request #420 from civis-vote/PRO-2685
sehgxl Jan 19, 2024
b7fbdd6
feat: Added Awards section
barath46 Feb 19, 2024
ea81792
feat: Added Awards section (#422)
cm-marvin[bot] Feb 19, 2024
3ae6f50
fix: Removed old margin top code
barath46 Feb 19, 2024
9b267c1
fix: Merge conflicts
barath46 Feb 19, 2024
7a25516
feat: Added ISPP link
barath46 Mar 1, 2024
2c7c502
fix: Merge conflicts
barath46 Mar 1, 2024
46557bd
fix: Skip login for specific consultation
barath46 Mar 13, 2024
0eae005
[staging] fix: Skip login for specific consultation. (#427)
cm-marvin[bot] Mar 13, 2024
fc788a0
fix: New queries added
barath46 Mar 13, 2024
ac39ed6
fix: Removed console logs
barath46 Mar 13, 2024
559bd93
fix: Merge conflicts
barath46 Mar 13, 2024
0d64a24
fix: Hide make my response public checkbox
barath46 Mar 13, 2024
308909e
Merge branch 'main' of github.com:civis-vote/civis-frontend into PRO-…
barath46 Mar 13, 2024
4cf71d4
[staging] fix: Hide make my response public checkbox (#430)
cm-marvin[bot] Mar 13, 2024
b4e2679
Remove satisfactory rating question
barath46 Mar 14, 2024
8bd4258
Merge branch 'main' of github.com:civis-vote/civis-frontend into PRO-…
barath46 Mar 14, 2024
f3954fd
[staging] fix: Remove satisfactory rating question (#432)
cm-marvin[bot] Mar 14, 2024
47a41c5
fix: Removed awards section and spacing change
barath46 Mar 14, 2024
141e6a0
fix: Merge conflicts
barath46 Mar 14, 2024
a099e41
Merge branch 'main' of github.com:civis-vote/civis-frontend into PRO-…
barath46 Mar 15, 2024
3aabd79
fix: Added satisfactory rating
barath46 Mar 15, 2024
2d098a3
[staging] fix: Added satisfactory rating back (#436)
cm-marvin[bot] Mar 15, 2024
88db3e3
fix: Added default satisfactory rating
barath46 Mar 15, 2024
23445b3
Merge branch 'main' of github.com:civis-vote/civis-frontend into PRO-…
barath46 Mar 15, 2024
e0d827d
fix: Removed console log
barath46 Mar 15, 2024
1ac019e
Merge branch 'PRO-3620' of github.com:civis-vote/civis-frontend into …
barath46 Mar 15, 2024
29b8d58
[staging] fix: Removed satisfactory rating (#440)
cm-marvin[bot] Mar 15, 2024
14becfc
[staging] fix: Added last viewed url to cookie (#442)
cm-marvin[bot] Mar 18, 2024
4338dc5
Updated tooltip content for What does this mean?
barath46 Mar 19, 2024
287c381
[staging] feat: Updated tooltip content for What does this mean? (#444)
cm-marvin[bot] Mar 19, 2024
ce07eed
fix: Tooltip overlap issue
barath46 Mar 19, 2024
ddbc559
fix: Merge conflicts
barath46 Mar 19, 2024
ee6f7f0
refactor: Make total number of citizens engaged static
sehgxl Mar 27, 2024
1153c98
[staging] fix: Removed SecurityContext. (#449)
cm-marvin[bot] Apr 9, 2024
7e0be6b
fix: Moved SUPPORTERS section
barath46 May 6, 2024
34bbb70
[staging] fix: Moved SUPPORTERS section (#451)
cm-marvin[bot] May 6, 2024
643e97c
fix: Supporters section bg colour change
barath46 May 6, 2024
995139a
fix: Merge conflicts
barath46 May 6, 2024
92a2afa
feat: Added new fields and maintenance banner
barath46 May 14, 2024
c956d89
[staging] feat: Added new fields and maintenance banner (#454)
cm-marvin[bot] May 15, 2024
539f5cb
fix: Uncommented maintenance banner
barath46 May 17, 2024
1727de3
fix: Merge conflicts
barath46 May 17, 2024
157fdf9
feat: Added new fields and maintenance banner (#453) (#457)
cm-marvin[bot] May 17, 2024
168eda6
Merge pull request #447 from civis-vote/PRO-3811
mikevic Jul 4, 2024
a620de0
[staging] fix: Placeholder text change (#461)
cm-marvin[bot] Aug 14, 2024
230acf3
feat: Added Organisation details and response counts in the Profile card
Bandinikhil Sep 11, 2024
686cc0a
Merge pull request #463 from civis-vote/PRO-5944
Bandinikhil Sep 11, 2024
d5b8865
refactor: code review changes
Bandinikhil Sep 12, 2024
5e7ca16
Merge pull request #464 from civis-vote/PRO-5944
Bandinikhil Sep 12, 2024
7e070e8
ci: test commit
mikevic Sep 13, 2024
dbfd1f1
Merge branch 'staging' into PRO-6172-Staging
Bandinikhil Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions customHttp.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
customHeaders:
- pattern: '**/*'
- pattern: "**/*"
headers:
- key: Content-Security-Policy
value: >-
default-src 'self' 'unsafe-inline' https://* https://api.razorpay.com wss:;
img-src https://* 'self' data: https://storage.googleapis.com;
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://client.crisp.chat https://unpkg.com https://*;
script-src 'self' 'unsafe-eval' 'unsafe-inline' https://* 'nonce-6A576D5A7134743777217A25432A462D' 'nonce-792F423F4528482B4D6251655368566D' 'sha256-C+IGLEBTrzg1cqDKPZqpHDyT8Xu0DaPNG2w4A4c/YwA=' 'sha256-5CHnVzl6ds4Czo4JIGZODmOQz6oAqOA2gFtZ5VbeqiY=' 'sha256-Uyj0M92yRd7fuZy0y0k0xpKoTyWNSDgZZXesLbzukrU=' https://unpkg.com https://www.google.com https://cdn.ckeditor.com https://edge.fullstory.com https://client.crisp.chat https://checkout.razorpay.com https://www.googletagmanager.com https://www.gstatic.com https://www.google-analytics.com;
script-src 'self' 'unsafe-eval' 'unsafe-inline' https://* 'nonce-6A576D5A7134743777217A25432A462D' 'nonce-792F423F4528482B4D6251655368566D' 'sha256-C+IGLEBTrzg1cqDKPZqpHDyT8Xu0DaPNG2w4A4c/YwA=' 'sha256-5CHnVzl6ds4Czo4JIGZODmOQz6oAqOA2gFtZ5VbeqiY=' 'sha256-Uyj0M92yRd7fuZy0y0k0xpKoTyWNSDgZZXesLbzukrU=' 'nonce-HK0O08yJcxnAqWev' https://unpkg.com https://www.google.com https://cdn.ckeditor.com https://edge.fullstory.com https://client.crisp.chat https://checkout.razorpay.com https://www.googletagmanager.com https://www.gstatic.com https://www.google-analytics.com https://translate.google.com;
connect-src 'self' 'unsafe-inline' https://* https://rs.fullstory.com https://api-staging.civis.vote wss://client.relay.crisp.chat sentry.io https://*.sentry.io *.sentry.io https://api.civis.vote;
font-src 'self' https://* https://fonts.gstatic.com https://client.crisp.chat;
frame-src 'self' https://* *.amazonaws.com https://api.razorpay.com; object-src 'self';
frame-src 'self' https://* *.amazonaws.com https://api.razorpay.com; object-src 'self';
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ app.get('*', function(req, res) {
res.sendFile(path.join(__dirname + '/dist/civis/index.html'));
});

console.log("listing on port", PORT);
console.log("listing on port", PORT);
4 changes: 2 additions & 2 deletions src/app/graphql/queries.graphql.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import gql from 'graphql-tag';

export const CurrentUser = gql`
query{
query getCurrentUser{
userCurrent {
id
bestRank
Expand Down Expand Up @@ -56,7 +56,7 @@ query{
`;

export const profanityList = gql`
query{
query profanityList{
profanityList {
data {
profaneWord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ export const ConsultationProfile = gql`
updatedAt
publishedAt
visibility
consultationPartnerResponses {
responseCount
organisation {
createdAt
employeeCount
id
name
officialUrl
updatedAt
logo {
filename
id
url
}
}
}
}
}
`;
Expand Down Expand Up @@ -214,6 +230,22 @@ export const ConsultationProfileCurrentUser = gql`
updatedAt
publishedAt
visibility
consultationPartnerResponses {
responseCount
organisation {
createdAt
employeeCount
id
name
officialUrl
updatedAt
logo {
filename
id
url
}
}
}
}
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,25 +327,26 @@ export class ConsultationQuestionnaireComponent
if (!isObjectEmpty(consultationResponse)) {
if (this.currentUser) {
this.metaPixelService.trackSubmitResponse();

this.apollo
.watchQuery({
query: UserCountUser,
variables: { userId: this.currentUser.id },
fetchPolicy: "no-cache",
})
.valueChanges.pipe(map((res: any) => res.data.userCountUser))
.subscribe(
(data) => {
if (!this.profanity_count_changed) {
this.userData = data;
this.checkAndUpdateProfanityCount();
.watchQuery({
query: UserCountUser,
variables: { userId: this.currentUser.id },
fetchPolicy: "no-cache",
})
.valueChanges.pipe(map((res: any) => res.data.userCountUser))
.subscribe(
(data) => {
if (!this.profanity_count_changed) {
this.userData = data;
this.checkAndUpdateProfanityCount();
}
},
(err) => {
const e = new Error(err);
this.errorService.showErrorModal(err);
}
},
(err) => {
const e = new Error(err);
this.errorService.showErrorModal(err);
}
);
);
} else {
//If user is not authenticated, showing auth modal and storing consultation respose object to local storage
this.authModal = true;
Expand All @@ -355,7 +356,7 @@ export class ConsultationQuestionnaireComponent
);
}
}
}
}
} else {
if (!this.responseFeedback) {
this.consultationService.satisfactionRatingError.next(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
.cke {
height: 100% !important;
border: none !important;

.cke_editable.cke_display_version_check-absolute:before {
display: none;
}

.cke_inner {
height: 100% !important;
.cke_top {
Expand Down Expand Up @@ -79,4 +84,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,129 +7,91 @@
<i class="fa fa-link" aria-hidden="true"></i>
</a>
</div>
<div class="ministry-detail">
<img [src]="profile?.ministry?.logo?.url" class="avatar avatar--42" alt=" " />
<p class="regular-text m-0">{{profile?.ministry?.name}}</p>
</div>
<div *ngIf="!summaryData">
<div *ngIf="!profile?.respondedOn || showResponseCreation">
<div class="d-flex justify-content-between align-items-center mb-1 mt-1">
<p class="days-remaining m-0">{{getRemainigDays(profile?.responseDeadline)}}</p>
<a [href]="createCalendarEvent()" class="icon-circle" target="_blank">
<i class="fa fa-calendar-plus-o" aria-hidden="true"></i>
</a>
</div>
<button *ngIf="consultationStatus === 'active'" class="btn-submit mt-3 active" (click)='stepNext(profile?.respondedOn)' data-event="lead">
<p class="m-0">
<span>
<picture class="citizen-logo">
<source srcset="assets/images/Vector.webp" type="image/webp">
<source srcset="assets/images/Vector.jpg" type="image/jpeg">
<img src="assets/images/Vector.jpg" />
</picture>
</span>
{{'SUBMIT RESPONSE' | translate}}
</p>
<span><i class="fa fa-angle-right"></i></span>
</button>
</div>
<div *ngIf="profile?.respondedOn && !showResponseCreation" class="response-submitted-block">
<div>
<span class="success-text mr-1"><i class="fa fa-check"></i></span>
</div>
<div>
<p class="mb-1 success-text">
{{'RESPONSE SUBMITTED' | translate}}
</p>
<p class="success-date m-0">{{convertDateFormat(profile?.respondedOn)}}</p>
</div>
</div>
<div class="share-block" *ngIf="profile?.visibility === 'public_consultation'">
<div class="share-block__position">
<div #shareOptionsElement class="share-pop-up" *ngIf="showShareOptions">
<a class="share-btn"
[href]="getFbUrl(currentUrl)"
target="_blank">
<span>
<i class="fa fa-facebook"></i>
</span>
</a>
<a class="share-btn"
[href]="getTwitterUrl(currentUrl)"
target="_blank">
<span>
<i class="fa fa-twitter"></i>
</span>
</a>
<a class="share-btn"
[href]="getWhatsappUrl(currentUrl)"
target="_blank">
<span>
<i class="fa fa-whatsapp"></i>
</span>
</a>
<a class="share-btn"
[href]="getLinkedinUrl(currentUrl)"
target="_blank">
<span>
<i class="fa fa-linkedin"></i>
</span>
</a>
</div>
</div>
<div class="spread-btn mt-3">
<button data-event="click-sidebar-share" #spreadButtonElement class="btn-circular"
(click)="showShareOptions = !showShareOptions">
<span class="mr-2 clr-blue"><i class="fa fa-share"></i></span>
<span class="blue-text bold-text">{{'Spread the word' | translate}}</span>
</button>
<button mat-button (click)="openDialog()" class="btn-circular" style="float: right;">
<span class="blue-text bold-text">{{'Glossary' | translate}}</span>
</button>
</div>
<div class="ministry-detail">
<img [src]="profile?.ministry?.logo?.url" class="avatar avatar--42" alt=" " />
<p class="regular-text m-0">{{profile?.ministry?.name}}</p>
</div>
<div *ngIf="!summaryData">
<div *ngIf="!profile?.respondedOn || showResponseCreation">
<div class="d-flex justify-content-between align-items-center mb-1 mt-1">
<p class="days-remaining m-0">{{getRemainigDays(profile?.responseDeadline)}}</p>
<a [href]="createCalendarEvent()" class="icon-circle" target="_blank">
<i class="fa fa-calendar-plus-o" aria-hidden="true"></i>
</a>
</div>

<button *ngIf="consultationStatus === 'active'" class="btn-submit mt-3 active" (click)='stepNext(profile?.respondedOn)' data-event="lead">
<p class="m-0">
<span>
<picture class="citizen-logo">
<source srcset="assets/images/Vector.webp" type="image/webp">
<source srcset="assets/images/Vector.jpg" type="image/jpeg">
<img src="assets/images/Vector.jpg" />
</picture>
</span>
{{'SUBMIT RESPONSE' | translate}}
</p>
<span><i class="fa fa-angle-right"></i></span>
</button>
</div>
<div *ngIf="summaryData" class="report-download-block">
<div *ngIf="profile?.respondedOn && !showResponseCreation" class="response-submitted-block">
<div>
<button class="btn-submit mt-3 active" (click)='downloadReport()'>
<p class="m-0">
<span><i class="fa fa-download"></i></span>
<span>{{'Download report as pdf' | translate}}</span>
</p>
</button>
<span class="success-text mr-1"><i class="fa fa-check"></i></span>
</div>
<div>
<p class="mb-1 success-text">
{{'RESPONSE SUBMITTED' | translate}}
</p>
<p class="success-date m-0">{{convertDateFormat(profile?.respondedOn)}}</p>
</div>
</div>
</div>
<div class="share-block" *ngIf="profile?.visibility === 'public_consultation'">
<div class="spread-btn mt-3">
<button class="btn-circular" (click)="showShareOptions = !showShareOptions">
<span class="mr-2 clr-blue"><i class="fa fa-share"></i></span>
<span class="blue-text bold-text">{{'Spread the word' | translate}}</span>
</button>
</div>
</div>
<hr class="divider-one" />
</div>

<hr class="divider" />

<div class="c-profile-card__bottom-section">
<div class="d-flex justify-content-between mb-3">
<p class="count-text m-0">{{'TOTAL RESPONSES' | translate}}</p>
<p class="count-number bold-text text-right m-0">
{{profile?.consultationResponsesCount ? profile?.consultationResponsesCount : 0}}
</p>
</div>
<div
class="d-flex justify-content-between mb-3"
*ngIf="profile?.reviewType && profile?.reviewType !== 'policy'"
>
<div class="d-flex justify-content-between mb-3" *ngIf="profile?.reviewType && profile?.reviewType !== 'policy'">
<p class="count-text m-0">{{'TOTAL PUBLIC RESPONSES' | translate}}</p>
<p class="count-number bold-text text-right m-0" *ngIf="!summaryData; else summaryDataCount">
{{profile?.sharedResponses?.totalCount ? profile?.sharedResponses?.totalCount : 0 }}
<p class="count-number bold-text text-right m-0">
{{profile?.sharedResponses?.totalCount || 0}}
</p>
<ng-template #summaryDataCount>
<p>
{{summaryData?.publicResponseCount ? summaryData?.publicResponseCount : 0}}
</p>
</ng-template>
</div>

<hr class="divider" />

<div *ngIf="profile?.consultationPartnerResponses?.length > 0">
<p class="count-text m-0">{{'PARTNER RESPONSES ' | translate}}</p>
<div *ngFor="let partner of profile?.consultationPartnerResponses">
<div class="partner-responses d-flex align-items-center">
<img [src]="partner?.organisation?.logo?.url" class="partner-logo" alt="Partner Logo" />
<div class="ml-3 partner-details">
<a [href]="getSecureUrl(partner?.organisation?.officialUrl)" target="_blank" class="partner-name">
{{ partner?.organisation?.name }}
</a>
</div>

<p class="response-count ml-auto">{{ partner?.responseCount || 0 }}</p>
</div>
</div>

<hr class="divider" />

</div>
<div class="d-flex justify-content-between">
<p class="count-text m-0">{{profile?.visibility === 'public_consultation' ? 'DRAFT MADE PUBLIC ON' : 'CONSULTATION PUBLISHED ON' | translate}}</p>
<p class="count-number bold-text text-right m-0">{{convertDateFormat(profile?.publishedAt)}}</p>
<p class="publish-date">{{'Consultation published on' | translate}} {{convertToFormattedDate(profile?.publishedAt)}}</p>
</div>
</div>
</div>
<app-glossary *ngIf="showGlossaryModal" (close)="showGlossaryModal = false"></app-glossary>
<app-confirm-email-modal *ngIf="showConfirmEmailModal" (close)="showConfirmEmailModal = false"></app-confirm-email-modal>
Loading