All Fields and service for missionary form
parent
a27d5890a8
commit
70817ad3a0
|
|
@ -13,6 +13,7 @@ import { SalvationPageComponent } from './components/salvation-page/salvation-pa
|
|||
import { CampPageComponent } from './components/camp-page/camp-page.component';
|
||||
import { MembersPageComponent } from './components/members-page/members-page.component';
|
||||
import { AddTransactionPageComponent } from './components/add-transaction-page/add-transaction-page.component';
|
||||
import { MissionaryFormPageComponent } from './components/missionary-form-page/missionary-form-page.component';
|
||||
|
||||
const routes =
|
||||
[
|
||||
|
|
@ -36,6 +37,10 @@ const routes =
|
|||
path: 'contact',
|
||||
component: ContactPageComponent
|
||||
},
|
||||
{
|
||||
path: 'missionary',
|
||||
component: MissionaryFormPageComponent
|
||||
},
|
||||
{
|
||||
path: 'sermons',
|
||||
component: SermonsComponent
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import { MatButtonModule,
|
|||
MatDialogModule,
|
||||
MatSelectModule,
|
||||
MatOptionModule,
|
||||
MatRadioModule,
|
||||
MatAutocompleteModule} from '@angular/material';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import 'hammerjs';
|
||||
|
|
@ -69,6 +70,8 @@ import { UserService } from './services/user.service';
|
|||
import { TransactionService } from './services/transaction.service';
|
||||
import { AddTransactionPageComponent } from './components/add-transaction-page/add-transaction-page.component';
|
||||
import { AddTransactionPopupComponent } from './components/add-transaction-page/add-transaction-popup/add-transaction-popup.component';
|
||||
import { MissionaryFormPageComponent } from './components/missionary-form-page/missionary-form-page.component';
|
||||
import { MissionarySupportService } from './services/missionary-support-service';
|
||||
|
||||
|
||||
|
||||
|
|
@ -113,7 +116,8 @@ import { AddTransactionPopupComponent } from './components/add-transaction-page/
|
|||
MembersPageComponent,
|
||||
AddUserPopupComponent,
|
||||
AddTransactionPageComponent,
|
||||
AddTransactionPopupComponent
|
||||
AddTransactionPopupComponent,
|
||||
MissionaryFormPageComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
|
@ -130,9 +134,10 @@ import { AddTransactionPopupComponent } from './components/add-transaction-page/
|
|||
MatSliderModule,
|
||||
MatSnackBarModule,
|
||||
MatDialogModule,
|
||||
MatAutocompleteModule
|
||||
MatAutocompleteModule,
|
||||
MatRadioModule
|
||||
],
|
||||
providers: [LoginService,UserService,GoogleAnalyticsService,SermonService,TransactionService,EventService,EmailService,WindowRefService],
|
||||
providers: [LoginService,UserService,GoogleAnalyticsService,SermonService,TransactionService,EventService,EmailService,MissionarySupportService,WindowRefService],
|
||||
entryComponents: [AddSermonPopupComponent,
|
||||
LoginPopupComponent,
|
||||
OkPopupComponent,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
.w-50 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.section-header{
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid gray;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
mat-label {
|
||||
font-weight: bold;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 1.15rem;
|
||||
margin-top: 35px;
|
||||
color: black;
|
||||
font-weight: 400;
|
||||
font-family: Arial, Helvetica, sans-serif
|
||||
}
|
||||
|
||||
ol > li {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
mat-label {
|
||||
font-size: 1.15rem;
|
||||
color: black;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
label.sub {
|
||||
margin-top: 0px;
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
mat-radio-button {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -0,0 +1,323 @@
|
|||
|
||||
<secondary-page-component [hideSideBarOnMobile]="true" >
|
||||
<div mainContent>
|
||||
<p class="section-header">
|
||||
Old Fashion Baptist Church Missionary Questionnaire
|
||||
</p>
|
||||
<p>
|
||||
I hate questionnaires! I've been there. I understand that deputation itself is tough enough already without some pastor probing into all kinds of areas! Then there is the fact that so many fundamental pastors themselves disagree in so many areas!
|
||||
Now that I’ve said what you may have already been thinking, let me also say that I am continually amazed that every church doesn’t use a questionnaire to vet their missionaries. The truth is, we take seriously the fact that you are being considered for support by our church and feel that we can’t truly get to know you unless we ask some simple questions.
|
||||
<br><br>
|
||||
You must understand that anyone whom we consider as a missionary for our Church has certain doctrinal beliefs which are assumed by us or else we would not be sending them a questionnaire. We also realize that good men will differ on some things and will make allowances accordingly. Also, because we have one questionnaire for all candidates, many of the things that are asked would be unnecessary if it were not being sent to everyone. We hope you understand that. In order for a missionary to be considered, we request that every question be answered.
|
||||
<br><br>
|
||||
Thank you for your time and understanding. The questions are not meant in any way to be “trick” questions.
|
||||
<br><br>
|
||||
God bless you!
|
||||
<br><br>
|
||||
Pastor Derek Loewen
|
||||
</p>
|
||||
<br><br>
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
<mat-form-field class="w-50">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput type="text" formControlName="name" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="w-50">
|
||||
<mat-label>Wifes Name</mat-label>
|
||||
<input matInput type="text" formControlName="wifesName" >
|
||||
</mat-form-field>
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>Home Phone</mat-label>
|
||||
<input matInput type="tel" formControlName="homePhone" >
|
||||
</mat-form-field>
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>Cell Phone</mat-label>
|
||||
<input matInput type="tel" formControlName="cellPhone" >
|
||||
</mat-form-field>
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>Field Phone</mat-label>
|
||||
<input matInput type="tel" formControlName="fieldPhone" >
|
||||
</mat-form-field>
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>Number of Children</mat-label>
|
||||
<input matInput type="number" formControlName="numberOfChildren" (keyup)="numberOfChildrenChange($event.target.value)" required >
|
||||
</mat-form-field>
|
||||
<div *ngIf="form.get('numberOfChildren').value > 0">
|
||||
<label id="childrenNamesLabel" >Names of Children</label>
|
||||
<ol>
|
||||
<li formArrayName="children" *ngFor="let child of form.get('children').controls; let i = index;">
|
||||
<div [formGroupName]="i">
|
||||
<mat-form-field floatLabel="never" class="w-100">
|
||||
<mat-label>Childs Name</mat-label>
|
||||
<input matInput type="text" formControlName="name" >
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<label id="testimonyLabel">Please give your testimony</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="testimony" aria-labelledby="testimonyLabel" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="callToFieldLabel">Please explain specifically your call to the field.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="callToField" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="sendingChurchLabel">Sending Church or Missions Board:</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="text" placeholder="Your Answer" formControlName="sendingChurch" required>
|
||||
</mat-form-field>
|
||||
<label id="fieldOfServiceLabel">What is your planned field of Service?</label>
|
||||
<label class="sub">Country and City</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="text" placeholder="Your Answer" formControlName="fieldOfService" required>
|
||||
</mat-form-field>
|
||||
<label id="plansLabel">What do your plans include?</label>
|
||||
<label class="sub">(Starting a church, continuing a church, starting a school, evangelizing the area...)</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="plans" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="evaluationOfNationalsLabel">What is your evaluation of the nationals you are trying to reach, spiritually and culturally?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="evaluationOfNationals" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="timeInCountryLabel">How long have you been in this country?</label>
|
||||
<label class="sub">If you have changed countries, what other countries have you been in and for how long?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="text" placeholder="Your Answer" formControlName="timeInCountry" required>
|
||||
</mat-form-field>
|
||||
<label id="correctWrongOfAnotherMissionaryLabel">If you knew that a fellow missionary was doing wrong or something quesstionable, what would be your course of action?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="correctWrongOfAnotherMissionary" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="financialStatementPrevYearLabel">Would you submit a general financial statement for the past year?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="financialStatementPrevYear" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="currentMonthlySupportLabel">What is your total monthly support (peronal, work fund, etc)?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="text" placeholder="Your Answer" formControlName="currentMonthlySupport" required>
|
||||
</mat-form-field>
|
||||
<label id="monthlySupportNeededLabel">How much monthly support do you calculate you will need?</label>
|
||||
<label class="sub">(We know that there will be differences)</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="text" placeholder="Your Answer" formControlName="monthlySupportNeeded" required>
|
||||
</mat-form-field>
|
||||
<label id="restAndRelaxationLabel">Are you diligent to have "Rest and Relaxation" during your stay on the field? Do you have a set time and plan for such necessary refreshing?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="restAndRelaxation" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="aloneOrTeamLabel">Do you plan to work alone or as a team? What are your feelings about the team concept?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="aloneOrTeam" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="childrenSchoolLabel">Do your children:</label>
|
||||
<label class="sub">Please mark even if your children are yet to be born.</label>
|
||||
<mat-radio-group aria-label="Type of School" formControlName="childrenSchool" aria-labelledby="childrenSchoolLabel">
|
||||
<mat-radio-button class="radio-button" value="1">Attend a Christian School</mat-radio-button>
|
||||
<mat-radio-button class="radio-button" value="2">Attend a Public School</mat-radio-button>
|
||||
<mat-radio-button class="radio-button" value="3">Home School</mat-radio-button>
|
||||
<mat-radio-button class="radio-button" value="4">Other</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="danceLabel">Do you or any of your family ever dance?</label>
|
||||
<mat-radio-group aria-label="Dance" formControlName="dance" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="worldlyMusicLabel">Do you or any of your family ever listen to worldly music in your home?</label>
|
||||
<label class="sub">(Including but not limited to: rock, country/western, r&b, etc.)</label>
|
||||
<mat-radio-group aria-label="Worldy Music" formControlName="worldlyMusic" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="movieTheatersLabel">Do you or any of your family ever attend public movie theaters?</label>
|
||||
<mat-radio-group aria-label="Movie Theaters" formControlName="movieTheaters" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="alcoholLabel">Do you or any of your family ever use any type of alcoholic beverage?</label>
|
||||
<mat-radio-group aria-label="Alcohol" formControlName="alcohol" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="smokingLabel">Do you or any of your family ever engage in any unclean habit such as smoking?</label>
|
||||
<mat-radio-group aria-label="Smoking" formControlName="smoking" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="maleHairLabel">If there are boys in your home, do they follow the same hair standard you follow?</label>
|
||||
<mat-radio-group aria-label="Male Hair" formControlName="maleHair" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="femalSlacksLabel">Does your wife wear slacks in public?</label>
|
||||
<mat-radio-group aria-label="Female Slacks" formControlName="femaleSlacks" class="w-100">
|
||||
<mat-radio-button value="1">Rarely</mat-radio-button>
|
||||
<mat-radio-button value="2">Often</mat-radio-button>
|
||||
<mat-radio-button value="3">On Sports Activities</mat-radio-button>
|
||||
<mat-radio-button value="4">Never</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="femaleShortsLabel">Does your wife wear shorts in public?</label>
|
||||
<mat-radio-group aria-label="Female Shorts" formControlName="femaleShorts" class="w-100">
|
||||
<mat-radio-button value="1">Rarely</mat-radio-button>
|
||||
<mat-radio-button value="2">Often</mat-radio-button>
|
||||
<mat-radio-button value="3">On Sports Activities</mat-radio-button>
|
||||
<mat-radio-button value="4">Never</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="femaleDressStandardLabel">Do the girls in your family follow the same dress standard your wife does?</label>
|
||||
<mat-radio-group aria-label="Female Dress Standard" formControlName="femaleDressStandard" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="swimmingClothingLabel">What do you do for clothing when you go swimming?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="swimmingClothing" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="televisionLabel">How do you feel about having a television in the home?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="television" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="dailyBibleLabel">Do you MAKE time daily for Bible Reading and Prayer?</label>
|
||||
<mat-radio-group aria-labeled-by="dailyBibleLabel" formControlName="dailyBible" class="w-100">
|
||||
<mat-radio-button value="1">Always</mat-radio-button>
|
||||
<mat-radio-button value="2">Sometimes</mat-radio-button>
|
||||
<mat-radio-button value="3">Rarely</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="numberLedToChrist">Outside of the church services where you have ministered, estimate how many people you have personally won to Christ in the last six months.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="number" placeholder="Your Answer" formControlName="numberLedToChrist" required>
|
||||
</mat-form-field>
|
||||
<label id="numberWitnessedToLabel">How many people have you personally witnessed to?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="number" placeholder="Your Answer" formControlName="numberWitnessedTo" required>
|
||||
</mat-form-field>
|
||||
<label id="numberWeeklyTractsLabel">On average, how many tracts do you pass out in a week?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<input matInput type="number" placeholder="Your Answer" formControlName="numberWeeklyTracts" required>
|
||||
</mat-form-field>
|
||||
<label id="rateOfSuccessLabel">What is your rate of success in fulfilling the great commission, getting your converts baptized and active in the local church where they may be taught?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="rateOfSuccess" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="predestinationLabel">Explain your position briefly concerning predestination and election.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="predestination" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="fellowshipAssociationLabel">Do you claim identity with any group or fellowship such as BBF, GARB, FBF, Other?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="fellowshipAssocation" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="collegeRecomendationsLabel">To a young person asking you to recommend a Christian College, list two or three Christian Colleges, in order of preference, which you would recommend?</label>
|
||||
<label class="sub">Please list the name, city, and state for each</label>
|
||||
<div *ngIf="form.get('collegeRecomendations').errors?.minColleges && (form.touched || form.dirty)" class="error">
|
||||
{{form.get('collegeRecomendations').errors?.minColleges}}
|
||||
</div>
|
||||
<ol>
|
||||
<li formArrayName="collegeRecomendations" *ngFor="let college of collegeRecommendationFormArray().controls; let i = index;">
|
||||
<div [formGroupName]="i">
|
||||
<mat-form-field floatLabel="never" class="w-100">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput type="text" formControlName="name">
|
||||
</mat-form-field>
|
||||
<mat-form-field floatLabel="never" class="w-50">
|
||||
<mat-label>City</mat-label>
|
||||
<input matInput type="text" formControlName="city">
|
||||
</mat-form-field>
|
||||
<mat-form-field floatLabel="never" class="w-50">
|
||||
<mat-label>State</mat-label>
|
||||
<input matInput type="text" formControlName="state">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="college.errors?.college && (form.touched || form.dirty)" class="error">
|
||||
{{college.errors?.college}}
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
<label id="admittedWrongLabel">When was the last time you admitted you were wrong about something and apologized?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="admittedWrong" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="divorcedLabel">Have you or your wife ever been divorced?</label>
|
||||
<mat-radio-group formControlName="divorced" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="groundsForRemarryLabel">Do you believe there are grounds whereby a man or women may remarry with a previous spouse still living?</label>
|
||||
<mat-radio-group aria-label="Grounds for Remarry" formControlName="groundsForRemarry" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="marryADivorceeLabel">Have you married a divorced couple or would you?</label>
|
||||
<mat-radio-group aria-label="Married a Divorcee" formControlName="marryADivorcee" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="masonicLodge">Do you believe that being a member of a masonic lodge conflicts with Biblical separation?</label>
|
||||
<mat-radio-group aria-label="Masonic Lodge" formControlName="masonicLodge" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="bibleVersionsUsedLabel">Please list the English version(s) of the Bible you use and approve for preaching and teaching.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="bibleVersionsUsed" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="bibleVersionOpinionLabel">Please give your opinion of all English versions of the Bible you use and approve for preaching and teaching.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="bibleVersionOpinion" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="contemporaryMusicLabel">Do you listen to or approve of either "Contemporary Christian Music" or "Gospel rock" music?</label>
|
||||
<mat-radio-group formControlName="contemporaryMusic" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="charasmaticismLabel">What is your position in relation to the modern day Charismatic movement?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="charasmaticism" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="tonguesLabel">Do you or any member of your family speak in tongues?</label>
|
||||
<mat-radio-group formControlName="tongues" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="repentanceNecessaryLabel">Is Repentance a necessary part of salvation?</label>
|
||||
<mat-radio-group formControlName="repentanceNecessary" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="repentanceDefinitionLabel">One definition of repentance is: "Repentance means changing your mind about whatever is keeping you from turning to Jesus."</label>
|
||||
<label class="sub">Do you agree or disagree? Explain your answer.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="repentanceDefinition" required ></textarea>
|
||||
</mat-form-field>
|
||||
<label id="fundamentalistLabel">Do you consider yourself a fundamentalist?</label>
|
||||
<mat-radio-group formControlName="fundamentalist" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="billsOnTimeLabel">Do you believe it is important to pay your bills on time?</label>
|
||||
<mat-radio-group formControlName="billsOnTime" class="w-100">
|
||||
<mat-radio-button value="true">Yes</mat-radio-button>
|
||||
<mat-radio-button value="false">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<label id="lateBillsLabel">How many times in the last 12 months have you been late paying a bill?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="lateBills" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="lateBillActionTakenLabel">What do you do to "make things right" when you are late paying a bill?</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="lateBillActionTaken" required></textarea>
|
||||
</mat-form-field>
|
||||
<label id="potentialHarvestLabel">Though we support Missions and Missionaries doing many things and serving on many fields, we look primarily for Missionaries going to the ripe Harvest fields to begin Churches which will eventually become indigenous Churches. Please evaluate for us the potential of the Harvest field to which you have been called by telling the response of the people at large to Tract or Bible Distribution, Door-to-Door Visitation, and Gospel Preaching.</label>
|
||||
<mat-form-field class="w-100" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="potentialHarvest" required></textarea>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="w-100 hidden" floatLabel="never">
|
||||
<textarea matInput type="text" placeholder="Your Answer" formControlName="honeyPot" required></textarea>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button type="submit" [disabled]="!form.valid || submitButtonDisabled">{{submitButtonText}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div sideBar class="side-bar">
|
||||
|
||||
</div>
|
||||
</secondary-page-component>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MissionaryFormPageComponent } from './missionary-form-page.component';
|
||||
|
||||
describe('MissionaryFormPageComponent', () => {
|
||||
let component: MissionaryFormPageComponent;
|
||||
let fixture: ComponentFixture<MissionaryFormPageComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MissionaryFormPageComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MissionaryFormPageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormArray, FormControl, ValidatorFn, ValidationErrors } from '@angular/forms';
|
||||
import { MissionarySupportService } from 'src/app/services/missionary-support-service';
|
||||
import { MatDialog, MatDialogConfig } from '@angular/material';
|
||||
import { OkPopupComponent } from '../popups/ok-popup/ok-popup.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-missionary-form-page',
|
||||
templateUrl: './missionary-form-page.component.html',
|
||||
styleUrls: ['./missionary-form-page.component.css']
|
||||
})
|
||||
export class MissionaryFormPageComponent implements OnInit {
|
||||
|
||||
form: FormGroup;
|
||||
submitButtonText: string = 'Submit';
|
||||
submitButtonDisabled: boolean = false;
|
||||
errorMessages: string[] = [];
|
||||
private maxNumberOfChildren: number = 30;
|
||||
|
||||
constructor(private formBuilder: FormBuilder, private matDialog: MatDialog, private missionarySupportService: MissionarySupportService) {
|
||||
this.setupForm();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
setupForm() {
|
||||
this.form = this.formBuilder.group({
|
||||
name: ['', [Validators.required]],
|
||||
homePhone: [''],
|
||||
cellPhone: [''],
|
||||
fieldPhone: [''],
|
||||
wifesName: [''],
|
||||
numberOfChildren: ['', [Validators.required, Validators.max(this.maxNumberOfChildren)]],
|
||||
children: this.formBuilder.array([]),
|
||||
testimony: ['', Validators.required],
|
||||
callToField: ['', Validators.required],
|
||||
sendingChurch: ['', Validators.required],
|
||||
fieldOfService: ['', Validators.required], //Country + City
|
||||
plans: ['', Validators.required],
|
||||
evaluationOfNationals: ['', Validators.required],
|
||||
timeInCountry: ['', Validators.required],
|
||||
correctWrongOfAnotherMissionary: ['', Validators.required],
|
||||
financialStatementPrevYear: [undefined, Validators.required],
|
||||
currentMonthlySupport: ['', Validators.required],
|
||||
monthlySupportNeeded: ['', Validators.required],
|
||||
restAndRelaxation: ['', Validators.required],
|
||||
aloneOrTeam: ['', Validators.required],
|
||||
childrenSchool: [undefined, Validators.required],
|
||||
dance: ['', Validators.required],
|
||||
worldlyMusic: [undefined, Validators.required],
|
||||
movieTheaters: [undefined, Validators.required],
|
||||
alcohol: [undefined, Validators.required],
|
||||
smoking: [undefined, Validators.required],
|
||||
maleHair: [undefined, Validators.required],
|
||||
femaleSlacks: [undefined, Validators.required],
|
||||
femaleShorts: [undefined, Validators.required],
|
||||
femaleDressStandard: [undefined, Validators.required],
|
||||
swimmingClothing: [undefined, Validators.required],
|
||||
television: [undefined, Validators.required],
|
||||
dailyBible: [undefined, Validators.required],
|
||||
numberLedToChrist: ['', [Validators.required, Validators.min(0), Validators.max(10000)]],
|
||||
numberWitnessedTo: ['', [Validators.required, Validators.min(0), Validators.max(10000)]],
|
||||
numberWeeklyTracts: ['', [Validators.required, Validators.min(0), Validators.max(10000)]],
|
||||
rateOfSuccess: ['', Validators.required],
|
||||
predestination: ['', Validators.required],
|
||||
fellowshipAssocation: ['', Validators.required],
|
||||
collegeRecomendations: this.formBuilder.array([this.createCollegeRecommendation(),this.createCollegeRecommendation(),this.createCollegeRecommendation()], this.minCollegeValidator),
|
||||
admittedWrong: ['', Validators.required],
|
||||
divorced: [undefined, Validators.required],
|
||||
groundsForRemarry: [undefined, Validators.required],
|
||||
marryADivorcee: [undefined, Validators.required],
|
||||
masonicLodge: [undefined, Validators.required],
|
||||
bibleVersionsUsed: ['', Validators.required],
|
||||
bibleVersionOpinion: ['', Validators.required],
|
||||
contemporaryMusic: ['', Validators.required],
|
||||
charasmaticism: ['', Validators.required],
|
||||
tongues: [undefined, Validators.required],
|
||||
repentanceNecessary: [undefined, Validators.required],
|
||||
repentanceDefinition: [undefined, Validators.required],
|
||||
fundamentalist: [undefined, Validators.required],
|
||||
billsOnTime: [undefined, Validators.required],
|
||||
lateBills: ['', Validators.required],
|
||||
lateBillActionTaken: ['', Validators.required],
|
||||
potentialHarvest: ['', Validators.required],
|
||||
honeyPot: ['.', Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
collegeRecommendationFormArray(): FormArray {
|
||||
return this.form.get('collegeRecommendations') as FormArray;
|
||||
}
|
||||
|
||||
addChildToForm() {
|
||||
const children = this.form.get('children') as FormArray;
|
||||
children.push(this.formBuilder.group({
|
||||
name: ['', Validators.required]
|
||||
}));
|
||||
}
|
||||
|
||||
createCollegeRecommendation(): FormGroup {
|
||||
return this.formBuilder.group({
|
||||
name: [''],
|
||||
city: [''],
|
||||
state: ['']
|
||||
}, { validators: [this.collegeValidator]});
|
||||
}
|
||||
|
||||
numberOfChildrenChange(number: Number) {
|
||||
let num = +number;
|
||||
num = num > this.maxNumberOfChildren ? this.maxNumberOfChildren : num;
|
||||
const children = this.form.get('children') as FormArray;
|
||||
while (children.length > num) {
|
||||
children.removeAt(children.length - 1);
|
||||
}
|
||||
while (children.length < num) {
|
||||
children.push(this.formBuilder.group({
|
||||
name: ['', Validators.required]
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
onSubmit(){
|
||||
this.errorMessages = [];
|
||||
if (this.errorMessages.length > 0){ return; }
|
||||
|
||||
this.submitButtonText = "Please Wait...";
|
||||
this.submitButtonDisabled = true;
|
||||
this.missionarySupportService.create(this.form.value)
|
||||
.subscribe(
|
||||
success => {this.emailSuccess();},
|
||||
error => {this.emailError();});
|
||||
}
|
||||
|
||||
private emailSuccess(){
|
||||
let opts = new MatDialogConfig;
|
||||
opts.data = { title:'Email Sent','message':'Thank You! Your message has been sent.' };
|
||||
let popup = this.matDialog.open(OkPopupComponent,opts);
|
||||
this.submitButtonText = "Submit";
|
||||
this.submitButtonDisabled = false;
|
||||
popup.afterClosed().subscribe(()=>{
|
||||
this.submitButtonText = "Form Submitted"
|
||||
});
|
||||
}
|
||||
|
||||
private emailError(){
|
||||
console.error("error");
|
||||
let opts = new MatDialogConfig;
|
||||
opts.data = { title:'Email Error','message':'Please make sure that you have entered a valid email address.' };
|
||||
let popup = this.matDialog.open(OkPopupComponent,opts);
|
||||
this.submitButtonText = "Submit";
|
||||
this.submitButtonDisabled = false;
|
||||
}
|
||||
|
||||
private minCollegeValidator(control: FormArray): ValidationErrors | null {
|
||||
const minRequired = 2;
|
||||
let valid = 0;
|
||||
for(let i = 0; i < control.controls.length; i++) {
|
||||
const val = control.controls[i].value;
|
||||
if (val.name && val.city && val.state && val.name.length > 0 && val.city.length > 0 && val.state.length > 0) {
|
||||
valid++;
|
||||
}
|
||||
}
|
||||
return valid >= minRequired ? null : { 'minColleges': 'Please enter at least two colleges.' };
|
||||
}
|
||||
|
||||
private collegeValidator(control: FormGroup): ValidationErrors | null {
|
||||
const name = control.value.name || '';
|
||||
const city = control.value.city || '';
|
||||
const state = control.value.state || '';
|
||||
if (name.length > 0 || city.length > 0 || state.length > 0) {
|
||||
if (name.length === 0 || city.length === 0 || state.length === 0) {
|
||||
return { 'college': 'Please enter name, city and state for each college.' };
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ export const EVENTS_ADD_URL = environment.baseUrl + "/api2/events/a/";
|
|||
export const EVENT_BY_ID = environment.baseUrl + "/api2/events/";
|
||||
export const EVENTS_BY_PAGE_URL = environment.baseUrl + "/api2/events/page/";
|
||||
export const EVENTS_DELETE_BY_ID_URL = environment.baseUrl + "/api2/events/a/";
|
||||
export const MISSIONARY_SUPPORT_CREATE_URL = environment.baseUrl + "/2/api/missionary";
|
||||
export const SERMONS_BY_ID = environment.baseUrl + '/api2/sermons/';
|
||||
export const SERMONS_BY_PAGE_URL = environment.baseUrl + '/api2/sermons/page/';
|
||||
export const SERMONS_BY_SEARCH_URL = environment.baseUrl + '/api2/sermons/search';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
||||
|
||||
import { throwError } from 'rxjs';
|
||||
import { catchError, tap } from 'rxjs/operators';
|
||||
import { MISSIONARY_SUPPORT_CREATE_URL } from '../constants/urls';
|
||||
|
||||
@Injectable()
|
||||
export class MissionarySupportService {
|
||||
|
||||
private options: {};
|
||||
|
||||
constructor(private httpClient: HttpClient){
|
||||
this.options = {
|
||||
withCredentials: true
|
||||
};
|
||||
}
|
||||
|
||||
create(body: any) {
|
||||
console.log(body);
|
||||
return this.httpClient.post(MISSIONARY_SUPPORT_CREATE_URL, body, this.options)
|
||||
.pipe(tap(res => console.log(res)), catchError(this.handleError));
|
||||
}
|
||||
|
||||
private handleError(error: HttpErrorResponse) {
|
||||
if (error.error instanceof ErrorEvent) {
|
||||
// A client-side or network error occurred. Handle it accordingly.
|
||||
console.error('An error occurred:', error.error.message);
|
||||
} else {
|
||||
// The backend returned an unsuccessful response code.
|
||||
// The response body may contain clues as to what went wrong,
|
||||
console.error(
|
||||
`Backend returned code ${error.status}, ` +
|
||||
`body was: ${error.error}`);
|
||||
console.error(error);
|
||||
}
|
||||
// return an observable with a user-facing error message
|
||||
return throwError((error && error.error && error.error.message) ? error.error.message :
|
||||
'Something bad happened; please try again later.');
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue