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

Feature waiver #125

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
425 changes: 425 additions & 0 deletions install_nvm.sh

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { UserFacade, UserStoreModel } from '@involvemint/client/shared/data-access';
import { RouteService } from '@involvemint/client/shared/routes';
import { StatefulComponent, StatusService } from '@involvemint/client/shared/util';
import { calculateEnrollmentStatus, EnrollmentStatus } from '@involvemint/shared/domain';
import { calculateEnrollmentStatus, EnrollmentStatus } from '@involvemint/shared/domain'
import { UnArray } from '@involvemint/shared/util';
import { tap } from 'rxjs/operators';
import { SignWaiverModalService } from '../sign-waiver-modal/sign-waiver-modal.service';
Expand Down Expand Up @@ -69,7 +69,15 @@ export class EnrollmentComponent extends StatefulComponent<State> implements OnI
status: enrollment ? calculateEnrollmentStatus(enrollment) : null,
});

if (
if ( // if user has signed waiver at sign-up and there is no custom waiver, accept the waiver automatically
this.state.enrollment &&
!this.state.enrollment?.acceptedWaiver &&
this.state.profile?.hasSignedWaiver && !(this.state.enrollment?.project.requireCustomWaiver)
) {
this.cf.enrollments.dispatchers.acceptWaiver(this.state.enrollment);
}

else if (
this.state.enrollment &&
!this.state.enrollment?.acceptedWaiver &&
this.state.enrollment?.enrollmentDocuments.length ===
Expand Down Expand Up @@ -142,6 +150,7 @@ export class EnrollmentComponent extends StatefulComponent<State> implements OnI

submitApplication(enrollment: EnrollmentStoreModel) {
this.cf.enrollments.dispatchers.submitApplication({ enrollmentId: enrollment.id });
this.user.cmProfile.dispatchers.editCmProfile({ hasSignedWaiver: true });
}

withdrawEnrollment(enrollment: EnrollmentStoreModel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<ion-buttons slot="end">
<ion-button (click)="next()">
{{
enrollment.project.requireCustomWaiver ? (state.page === 'standard' ? 'Next' : 'Close') : 'Close'
enrollment.project.requireCustomWaiver ? (state.page === 'standard' ? 'Next' : 'Close') : 'Close'
}}
<ion-icon name="chevron-forward"></ion-icon>
</ion-button>
Expand All @@ -41,27 +41,23 @@

<ion-content>
<ng-container *ngIf="state.page === 'custom'">
<iframe
*ngIf="enrollment.project.customWaiverFilePath as url"
body
[src]="url | imStorageUrl: true | async"
width="100%"
height="100%"
frameborder="no"
></iframe>
<iframe *ngIf="enrollment.project.customWaiverFilePath as url" body [src]="url | imStorageUrl: true | async"
width="100%" height="100%" frameborder="no"></iframe>
</ng-container>
<div class="cont" *ngIf="state.page === 'standard'">
<p [style.font-size]="'23px'" [style.text-align]="'center'">
<b>RELEASE AND WAIVER OF LIABILITY AGREEMENT</b>
</p>
<p>
IN CONSIDERATION OF permission to [{{ enrollment.project.description }}] (the "Activity") hosted by
[{{ enrollment.project.servePartner.name }}] ("ServePartner") and facilitated through my engagement
with involveMINT **Terms of Service** , engaging in any and all lawful activities incidental to the
forgoing activities, except as restricted in involveMINT **Terms of Service**.[s] provided by
involveMINT, the undersigned, both as an individual and on behalf of their legal representatives,
heirs, successors, and assigns, (collectively, the "ChangeMaker"), hereby releases, waives, and
discharges ServePartner, involveMINT, and any/all of their affiliates, subsidiaries, attorneys,
IN CONSIDERATION OF permission to join and participate in Activities and Projects hosted by
InvolveMINT's online services, including the Community Impact Network Software (CIN) and any
related content, functionality and services (collectively, the "Services") and organized by the
Project Admin ("Organization or individual(s) creating, and/or managing the project") and
facilitated through my engagement with involveMINT **Terms of Service** , engaging in any and all
lawful activities incidental to the forgoing activities, except as restricted in involveMINT **Terms of
Service**. I provide by involveMINT, the undersigned, both as an individual and on behalf of their legal
representatives, heirs, successors, and assigns, (collectively, the "ChangeMaker"), hereby releases, waives,
and discharges ServePartner, involveMINT, and any/all of their affiliates, subsidiaries, attorneys,
officers, directors, agents, representatives, and employees (collectively "Agents") from any and all
liability for any and all claims, losses or damages on account of injury to ChangeMaker's person or
property, whether caused by the negligence of ServePartner, involveMINT, the aforementioned Agents, or
Expand All @@ -73,33 +69,33 @@
</p>
<p>ChangeMaker agrees to:</p>
<div>
<ol>
<ol>
<li>
abide by all instructions issued by ServePartner, including, without limitation, safety and
security measures while participating in the ServePartner Activity,
</li>
<li>
abide by all instructions issued by ServePartner, including, without limitation, safety and
security measures while participating in the ServePartner Activity,
</li>
<li>
be responsible for all costs and expenses associated with any damage to property or injury to
person, to ServePartner or any third party, caused by ChangeMaker while participating in the
ServePartner Activity.
</li>
<li>
not drive an automobile in connection to the activities described above unless ChangeMaker is
fully licensed and insured to do so as required by applicable PA law,
</li>
<li>
not, under any circumstances whatsoever, take or participate in or facilitate the taking of or
participation in any photography, videotaping or other recordings of any nature without the
explicit consent of ServePartner, and
</li>
<li>
be responsible for and acknowledges their understanding that any actions in violation of sections
(1), (2) or (3) hereof may result in, among other things, the immediate dismissal of ChangeMaker
from the ServePartner Activity and disqualification of ChangeMaker for any previously agreed to
benefit, financial or otherwise, arising out of ChangeMaker's participation in the ServePartner
Activity and provided by involveMINT.
</li>
</ol>
be responsible for all costs and expenses associated with any damage to property or injury to
person, to ServePartner or any third party, caused by ChangeMaker while participating in the
ServePartner Activity.
</li>
<li>
not drive an automobile in connection to the activities described above unless ChangeMaker is
fully licensed and insured to do so as required by applicable PA law,
</li>
<li>
not, under any circumstances whatsoever, take or participate in or facilitate the taking of or
participation in any photography, videotaping or other recordings of any nature without the
explicit consent of ServePartner, and
</li>
<li>
be responsible for and acknowledges their understanding that any actions in violation of sections
(1), (2) or (3) hereof may result in, among other things, the immediate dismissal of ChangeMaker
from the ServePartner Activity and disqualification of ChangeMaker for any previously agreed to
benefit, financial or otherwise, arising out of ChangeMaker's participation in the ServePartner
Activity and provided by involveMINT.
</li>
</ol> -
</div>
<p>
ChangeMaker expressly agrees that this Release and Waiver of Liability Agreement (this "Agreement") is
Expand All @@ -117,4 +113,4 @@
</p>
</div>
</ion-content>
</ng-container>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { EnrollmentStoreModel } from '@involvemint/client/cm/data-access';
import { StatefulComponent } from '@involvemint/client/shared/util';
import { ModalController } from '@ionic/angular';
import { tap } from 'rxjs/operators';
import { UserFacade, UserStoreModel } from '@involvemint/client/shared/data-access';

export interface SignWaiverModalComponentInputs {
enrollment: EnrollmentStoreModel;
}

type CmProfile = NonNullable<UserStoreModel['changeMaker']>;
interface State {
profile: CmProfile | null;
page: 'standard' | 'custom';
}

Expand All @@ -23,8 +27,27 @@ export class SignWaiverModalComponent
{
@Input() enrollment!: EnrollmentStoreModel;

constructor(private readonly modal: ModalController) {
super({ page: 'standard' });
constructor(private readonly modal: ModalController, private readonly user: UserFacade) {
super({ profile: null, page: 'standard' });
}

ngOnInit() {
this.effect(() =>
this.user.session.selectors.changeMaker$.pipe(
tap((changeMaker) => this.updateState({ profile: changeMaker }))
)
)
// If the user has signed the general waiver, update the modal to display the custom waiver.
// If there is no custom waiver, waiver should automatically be accepted (check enrollment.component.ts)
this.effect(() =>
this.user.session.selectors.changeMaker$.pipe(
tap(() => {
if ( this.state.profile?.hasSignedWaiver && this.state.page === 'standard' ) {
this.updateState({ page: 'custom' });
}
})
)
)
}

deny() {
Expand Down
18 changes: 18 additions & 0 deletions libs/client/shared/assets/src/lib/icons/waiver.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<div *ngSwitchCase="'terms'">
<p>
These User Terms of Service shall govern the use of involveMINT’s hosted and online services,
including the Social Currency Exchange Software, (Collectively, the “Service”) by all Authorized
including the Community Impact Network, (Collectively, the “Service”) by all Authorized
Users.
</p>
<p>
Subject to this Agreement, involveMINT - a fiscally sponsored Project of New Sun Rising, a 501c3
Subject to this Agreement, involveMINT Inc., a 501c3
organization - with offices located at 5648 Friendship Ave., Pittsburgh, PA 15206, (“involveMINT”)
will provide you with use of the Service. Your registration for, or use of, the Service shall be
deemed to be your agreement to abide by these User Terms of Service (“Agreement”). For reference, a
Expand Down Expand Up @@ -98,7 +98,7 @@
</p>
<p>
This Agreement is not a sale and does not convey to you any rights of ownership in or related to the
Service, the Social Currency Exchange Software or the Intellectual Property Rights owned by
Service, the Community Impact Network or the Intellectual Property Rights owned by
involveMINT. The involveMINT name, the involveMINT logo, and the product names associated with the
Service are trademarks of involveMINT or third parties, and no right or license is granted to use
them.
Expand Down Expand Up @@ -249,7 +249,7 @@
providing the Service.
</p>
<p>
“Service(s)” means the technology, documentation and Social Currency Exchange Software licensed under
“Service(s)” means the technology, documentation and Community Impact Network licensed under
the SLA. Services also includes ancillary online or offline products and services provided to you by
involveMINT, to which you are being granted access under this Agreement.
</p>
Expand All @@ -258,4 +258,4 @@
<div *ngSwitchCase="'privacy'">N/A</div>
<div *ngSwitchCase="'waiver'">N/A</div>
</div>
</ion-content>
</ion-content>
Loading