@churchapps/apphelper 0.3.49 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CreatePerson.js +1 -1
- package/dist/components/CreatePerson.js.map +1 -1
- package/dist/components/FormCardPayment.js +1 -1
- package/dist/components/FormCardPayment.js.map +1 -1
- package/dist/components/gallery/GalleryModal.js +1 -1
- package/dist/components/gallery/GalleryModal.js.map +1 -1
- package/dist/components/gallery/StockPhotos.js +2 -2
- package/dist/components/gallery/StockPhotos.js.map +1 -1
- package/dist/components/header/PrimaryMenu.js.map +1 -1
- package/dist/components/iconPicker/IconPicker.js +1 -1
- package/dist/components/iconPicker/IconPicker.js.map +1 -1
- package/dist/components/markdownEditor/Editor.js +2 -2
- package/dist/components/markdownEditor/Editor.js.map +1 -1
- package/dist/components/markdownEditor/MarkdownModal.js +2 -2
- package/dist/components/markdownEditor/MarkdownModal.js.map +1 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts +1 -3
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts.map +1 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts +1 -1
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts.map +1 -1
- package/dist/components/reporting/ReportFilter.js.map +1 -1
- package/dist/components/reporting/ReportOutput.js +1 -1
- package/dist/components/reporting/ReportOutput.js.map +1 -1
- package/dist/components/reporting/ReportWithFilter.js +1 -1
- package/dist/components/reporting/ReportWithFilter.js.map +1 -1
- package/dist/components/reporting/TableReport.js.map +1 -1
- package/dist/components/reporting/TreeReport.js.map +1 -1
- package/dist/components/wrapper/ChurchList.js.map +1 -1
- package/dist/components/wrapper/Drawers.d.ts +2 -6
- package/dist/components/wrapper/Drawers.d.ts.map +1 -1
- package/dist/components/wrapper/Notifications.js.map +1 -1
- package/dist/components/wrapper/PrivateMessages.js.map +1 -1
- package/dist/components/wrapper/SiteWrapper.d.ts +1 -1
- package/dist/components/wrapper/SiteWrapper.d.ts.map +1 -1
- package/dist/components/wrapper/UserMenu.js.map +1 -1
- package/dist/donationComponents/DonationPage.js.map +1 -1
- package/dist/donationComponents/components/BankForm.js +3 -3
- package/dist/donationComponents/components/BankForm.js.map +1 -1
- package/dist/donationComponents/components/CardForm.js +1 -1
- package/dist/donationComponents/components/CardForm.js.map +1 -1
- package/dist/donationComponents/components/DonationForm.js +3 -3
- package/dist/donationComponents/components/DonationForm.js.map +1 -1
- package/dist/donationComponents/components/FundDonation.js +1 -1
- package/dist/donationComponents/components/FundDonation.js.map +1 -1
- package/dist/donationComponents/components/NonAuthDonationInner.js +2 -2
- package/dist/donationComponents/components/NonAuthDonationInner.js.map +1 -1
- package/dist/donationComponents/components/PaymentMethods.js.map +1 -1
- package/dist/donationComponents/components/RecurringDonations.js.map +1 -1
- package/dist/donationComponents/components/RecurringDonationsEdit.js +1 -1
- package/dist/donationComponents/components/RecurringDonationsEdit.js.map +1 -1
- package/dist/pageComponents/LoginPage.js +2 -2
- package/dist/pageComponents/LoginPage.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchRegister.js +1 -1
- package/dist/pageComponents/components/SelectChurchRegister.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchSearch.js.map +1 -1
- package/dist/pageComponents/components/SelectableChurch.js +1 -1
- package/dist/pageComponents/components/SelectableChurch.js.map +1 -1
- package/package.json +36 -36
- package/src/components/CreatePerson.tsx +4 -4
- package/src/components/FormCardPayment.tsx +5 -5
- package/src/components/gallery/GalleryModal.tsx +2 -2
- package/src/components/gallery/StockPhotos.tsx +4 -4
- package/src/components/header/PrimaryMenu.tsx +1 -1
- package/src/components/iconPicker/IconPicker.tsx +1 -1
- package/src/components/markdownEditor/Editor.tsx +1 -1
- package/src/components/markdownEditor/MarkdownModal.tsx +2 -2
- package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.tsx +1 -1
- package/src/components/markdownEditor/plugins/emoji/EmojiNode.tsx +1 -1
- package/src/components/markdownEditor/plugins/emoji/EmojisPlugin.tsx +1 -1
- package/src/components/reporting/ReportFilter.tsx +1 -1
- package/src/components/reporting/ReportOutput.tsx +3 -3
- package/src/components/reporting/ReportWithFilter.tsx +2 -2
- package/src/components/reporting/TableReport.tsx +3 -3
- package/src/components/reporting/TreeReport.tsx +6 -6
- package/src/components/wrapper/ChurchList.tsx +1 -1
- package/src/components/wrapper/Notifications.tsx +1 -1
- package/src/components/wrapper/PrivateMessages.tsx +1 -1
- package/src/components/wrapper/SiteWrapper.tsx +1 -1
- package/src/components/wrapper/UserMenu.tsx +1 -1
- package/src/donationComponents/DonationPage.tsx +3 -3
- package/src/donationComponents/components/BankForm.tsx +6 -6
- package/src/donationComponents/components/CardForm.tsx +2 -2
- package/src/donationComponents/components/DonationForm.tsx +5 -5
- package/src/donationComponents/components/FundDonation.tsx +2 -2
- package/src/donationComponents/components/NonAuthDonationInner.tsx +8 -8
- package/src/donationComponents/components/PaymentMethods.tsx +1 -1
- package/src/donationComponents/components/RecurringDonations.tsx +3 -3
- package/src/donationComponents/components/RecurringDonationsEdit.tsx +2 -2
- package/src/pageComponents/LoginPage.tsx +2 -2
- package/src/pageComponents/components/SelectChurchRegister.tsx +4 -4
- package/src/pageComponents/components/SelectChurchSearch.tsx +1 -1
- package/src/pageComponents/components/SelectableChurch.tsx +2 -2
|
@@ -53,7 +53,7 @@ export const Notifications: React.FC<Props> = (props) => {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
const getMainLinks = () => {
|
|
56
|
-
let result:
|
|
56
|
+
let result: React.ReactElement[] = [];
|
|
57
57
|
notifications.forEach(notification => {
|
|
58
58
|
let datePosted = new Date(notification.timeSent);
|
|
59
59
|
const displayDuration = DateHelper.getDisplayDuration(datePosted);
|
|
@@ -44,7 +44,7 @@ export const PrivateMessages: React.FC<Props> = (props) => {
|
|
|
44
44
|
React.useEffect(() => { console.log("RELOADED PMS") }, []);
|
|
45
45
|
|
|
46
46
|
const getMainLinks = () => {
|
|
47
|
-
let result:
|
|
47
|
+
let result: React.ReactElement[] = [];
|
|
48
48
|
privateMessages.forEach(pm => {
|
|
49
49
|
|
|
50
50
|
const person = pm.person;
|
|
@@ -10,7 +10,7 @@ import { SocketHelper } from "../../helpers/SocketHelper";
|
|
|
10
10
|
import { ClosedDrawer, ClosedDrawerAppBar, OpenDrawer, OpenDrawerAppBar } from "./Drawers";
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
|
-
navContent:
|
|
13
|
+
navContent: React.ReactElement,
|
|
14
14
|
context: UserContextInterface,
|
|
15
15
|
children: React.ReactNode,
|
|
16
16
|
appName: string,
|
|
@@ -55,7 +55,7 @@ export const UserMenu: React.FC<Props> = (props) => {
|
|
|
55
55
|
const getMainLinks = () => {
|
|
56
56
|
const jwt = ApiHelper.getConfig("MembershipApi").jwt;
|
|
57
57
|
const churchId = UserHelper.currentUserChurch.church.id;
|
|
58
|
-
let result:
|
|
58
|
+
let result: React.ReactElement[] = [];
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
result.push(<NavItem onClick={() => {setShowPM(true)}} label={Locale.label("wrapper.messages")} icon="mail" key="/messages" onNavigate={props.onNavigate} badgeCount={props.notificationCounts.pmCount} />);
|
|
@@ -94,7 +94,7 @@ export const DonationPage: React.FC<Props> = (props) => {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
const getEditContent = () => {
|
|
97
|
-
const result:
|
|
97
|
+
const result: React.ReactElement[] = [];
|
|
98
98
|
const date = new Date();
|
|
99
99
|
const currentY = date.getFullYear();
|
|
100
100
|
const lastY = date.getFullYear() - 1;
|
|
@@ -139,7 +139,7 @@ export const DonationPage: React.FC<Props> = (props) => {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
const getRows = () => {
|
|
142
|
-
let rows:
|
|
142
|
+
let rows: React.ReactElement[] = [];
|
|
143
143
|
|
|
144
144
|
if (donations.length === 0) {
|
|
145
145
|
rows.push(<TableRow key="0"><TableCell>{Locale.label("donation.page.willAppear")}</TableCell></TableRow>);
|
|
@@ -162,7 +162,7 @@ export const DonationPage: React.FC<Props> = (props) => {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
const getTableHeader = () => {
|
|
165
|
-
const rows:
|
|
165
|
+
const rows: React.ReactElement[] = []
|
|
166
166
|
|
|
167
167
|
if (donations.length > 0) {
|
|
168
168
|
rows.push(
|
|
@@ -107,10 +107,10 @@ export const BankForm: React.FC<Props> = (props) => {
|
|
|
107
107
|
return (<>
|
|
108
108
|
<p>{Locale.label("donation.bankForm.twoDeposits")}</p>
|
|
109
109
|
<Grid container columnSpacing={2}>
|
|
110
|
-
<Grid
|
|
110
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
111
111
|
<TextField fullWidth aria-label="amount1" label={Locale.label("donation.bankForm.firstDeposit")} name="amount1" placeholder="00" inputProps={{ maxLength: 2 }} onChange={handleVerify} onKeyPress={handleKeyPress} />
|
|
112
112
|
</Grid>
|
|
113
|
-
<Grid
|
|
113
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
114
114
|
<TextField fullWidth aria-label="amount2" label={Locale.label("donation.bankForm.secondDeposit")} name="amount2" placeholder="00" inputProps={{ maxLength: 2 }} onChange={handleVerify} onKeyPress={handleKeyPress} />
|
|
115
115
|
</Grid>
|
|
116
116
|
</Grid>
|
|
@@ -120,20 +120,20 @@ export const BankForm: React.FC<Props> = (props) => {
|
|
|
120
120
|
let accountDetails = <></>
|
|
121
121
|
if (!props.bank.id) accountDetails = (
|
|
122
122
|
<Grid container spacing={3}>
|
|
123
|
-
<Grid
|
|
123
|
+
<Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
|
|
124
124
|
<TextField fullWidth label={Locale.label("donation.bankForm.routingNumber")} type="number" name="routing_number" aria-label="routing-number" placeholder="Routing Number" className="form-control" onChange={handleChange} />
|
|
125
125
|
</Grid>
|
|
126
|
-
<Grid
|
|
126
|
+
<Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
|
|
127
127
|
<TextField fullWidth label={Locale.label("donation.bankForm.accountNumber")} type="number" name="account_number" aria-label="account-number" placeholder="Account Number" className="form-control" onChange={handleChange} />
|
|
128
128
|
</Grid>
|
|
129
129
|
</Grid>
|
|
130
130
|
);
|
|
131
131
|
return (<>
|
|
132
132
|
<Grid container spacing={3}>
|
|
133
|
-
<Grid
|
|
133
|
+
<Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
|
|
134
134
|
<TextField fullWidth label="Account Holder Name" name="account_holder_name" required aria-label="account-holder-name" placeholder="Account Holder Name" value={bankAccount.account_holder_name} className="form-control" onChange={handleChange} />
|
|
135
135
|
</Grid>
|
|
136
|
-
<Grid
|
|
136
|
+
<Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
|
|
137
137
|
<FormControl fullWidth>
|
|
138
138
|
<InputLabel>{Locale.label("donation.bankForm.name")}</InputLabel>
|
|
139
139
|
<Select label={Locale.label("donation.bankForm.name")} name="account_holder_type" aria-label="account-holder-type" value={bankAccount.account_holder_type} onChange={handleChange}>
|
|
@@ -91,10 +91,10 @@ export const CardForm: React.FC<Props> = (props) => {
|
|
|
91
91
|
{!props.card.id
|
|
92
92
|
? <CardElement options={formStyling} />
|
|
93
93
|
: <Grid container spacing={3}>
|
|
94
|
-
<Grid
|
|
94
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
95
95
|
<TextField fullWidth aria-label="card-exp-month" label={Locale.label("donation.cardForm.expirationMonth")} name="exp_month" value={cardUpdate.cardData.card.exp_month} placeholder="MM" inputProps={{ maxLength: 2 }} onChange={handleChange} onKeyPress={handleKeyPress} />
|
|
96
96
|
</Grid>
|
|
97
|
-
<Grid
|
|
97
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
98
98
|
<TextField fullWidth aria-label="card-exp-year" label={Locale.label("donation.cardForm.expirationYear")} name="exp_year" value={cardUpdate.cardData.card.exp_year} placeholder="YY" inputProps={{ maxLength: 2 }} onChange={handleChange} onKeyPress={handleKeyPress} />
|
|
99
99
|
</Grid>
|
|
100
100
|
</Grid>
|
|
@@ -189,17 +189,17 @@ export const DonationForm: React.FC<Props> = (props) => {
|
|
|
189
189
|
<DonationPreviewModal show={showDonationPreviewModal} onHide={() => setShowDonationPreviewModal(false)} handleDonate={makeDonation} donation={donation} donationType={donationType} payFee={payFee} paymentMethodName={paymentMethodName} funds={funds} />
|
|
190
190
|
<InputBox id="donationBox" aria-label="donation-box" headerIcon="volunteer_activism" headerText={Locale.label("donation.donationForm.donate")} ariaLabelSave="save-button" cancelFunction={donationType ? handleCancel : undefined} saveFunction={donationType ? handleSave : undefined} saveText={Locale.label("donation.donationForm.preview")}>
|
|
191
191
|
<Grid container spacing={3}>
|
|
192
|
-
<Grid
|
|
192
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
193
193
|
<Button aria-label="single-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "once" ? "contained" : "outlined"} onClick={() => handleDonationSelect("once")}>{Locale.label("donation.donationForm.make")}</Button>
|
|
194
194
|
</Grid>
|
|
195
|
-
<Grid
|
|
195
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
196
196
|
<Button aria-label="recurring-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "recurring" ? "contained" : "outlined"} onClick={() => handleDonationSelect("recurring")}>{Locale.label("donation.donationForm.makeRecurring")}</Button>
|
|
197
197
|
</Grid>
|
|
198
198
|
</Grid>
|
|
199
199
|
{donationType
|
|
200
200
|
&& <div style={{ marginTop: "20px" }}>
|
|
201
201
|
<Grid container spacing={3}>
|
|
202
|
-
<Grid
|
|
202
|
+
<Grid size={12}>
|
|
203
203
|
<FormControl fullWidth>
|
|
204
204
|
<InputLabel>{Locale.label("donation.donationForm.method")}</InputLabel>
|
|
205
205
|
<Select label={Locale.label("donation.donationForm.method")} name="method" aria-label="method" value={donation.id} className="capitalize" onChange={handleChange}>
|
|
@@ -210,10 +210,10 @@ export const DonationForm: React.FC<Props> = (props) => {
|
|
|
210
210
|
</Grid>
|
|
211
211
|
{donationType === "recurring"
|
|
212
212
|
&& <Grid container spacing={3} style={{marginTop:10}}>
|
|
213
|
-
<Grid
|
|
213
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
214
214
|
<TextField fullWidth name="date" type="date" aria-label="date" label={Locale.label("donation.donationForm.startDate")} value={DateHelper.formatHtml5Date(new Date(donation.billing_cycle_anchor))} onChange={handleChange} onKeyDown={handleKeyDown} />
|
|
215
215
|
</Grid>
|
|
216
|
-
<Grid
|
|
216
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
217
217
|
<FormControl fullWidth>
|
|
218
218
|
<InputLabel>{Locale.label("donation.donationForm.frequency")}</InputLabel>
|
|
219
219
|
<Select label={Locale.label("donation.donationForm.frequency")} name="interval" aria-label="interval" value={interval} onChange={handleChange}>
|
|
@@ -40,10 +40,10 @@ export const FundDonation: React.FC<Props> = (props) => {
|
|
|
40
40
|
return (
|
|
41
41
|
<>
|
|
42
42
|
<Grid container spacing={3}>
|
|
43
|
-
<Grid
|
|
43
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
44
44
|
<TextField fullWidth name="amount" label={Locale.label("donation.fundDonations.amount")} type="number" disabled={props.params?.amount && props.params.amount !== ""} aria-label="amount" lang="en-150" value={props.fundDonation.amount || ""} onChange={handleChange} />
|
|
45
45
|
</Grid>
|
|
46
|
-
<Grid
|
|
46
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
47
47
|
<FormControl fullWidth>
|
|
48
48
|
<InputLabel>{Locale.label("donation.fundDonations.fund")}</InputLabel>
|
|
49
49
|
<Select fullWidth label={Locale.label("donation.fundDonations.fund")} name="fund" aria-label="fund" value={props.fundDonation.fundId} onChange={handleChange}>
|
|
@@ -234,22 +234,22 @@ export const NonAuthDonationInner: React.FC<Props> = ({ mainContainerCssProps, s
|
|
|
234
234
|
<InputBox headerIcon={showHeader ? "volunteer_activism" : ""} headerText={showHeader ? "Donate" : ""} saveFunction={handleSave} saveText="Donate" isSubmitting={processing || !captchaResponse || captchaResponse === "robot"} mainContainerCssProps={mainContainerCssProps}>
|
|
235
235
|
<ErrorMessages errors={errors} />
|
|
236
236
|
<Grid container spacing={3}>
|
|
237
|
-
<Grid
|
|
237
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
238
238
|
<Button aria-label="single-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "once" ? "contained" : "outlined"} onClick={() => setDonationType("once")}>{Locale.label("donation.donationForm.make")}</Button>
|
|
239
239
|
</Grid>
|
|
240
|
-
<Grid
|
|
240
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
241
241
|
<Button aria-label="recurring-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "recurring" ? "contained" : "outlined"} onClick={() => setDonationType("recurring")}>{Locale.label("donation.donationForm.makeRecurring")}</Button>
|
|
242
242
|
</Grid>
|
|
243
|
-
<Grid
|
|
243
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
244
244
|
<TextField fullWidth label={Locale.label("person.firstName")} name="firstName" value={firstName} onChange={handleChange} />
|
|
245
245
|
</Grid>
|
|
246
|
-
<Grid
|
|
246
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
247
247
|
<TextField fullWidth label={Locale.label("person.lastName")} name="lastName" value={lastName} onChange={handleChange} />
|
|
248
248
|
</Grid>
|
|
249
|
-
<Grid
|
|
249
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
250
250
|
<TextField fullWidth label={Locale.label("person.email")} name="email" value={email} onChange={handleChange} />
|
|
251
251
|
</Grid>
|
|
252
|
-
<Grid
|
|
252
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
253
253
|
<ReCAPTCHA sitekey={props.recaptchaSiteKey} ref={captchaRef} onChange={handleCaptchaChange} />
|
|
254
254
|
</Grid>
|
|
255
255
|
</Grid>
|
|
@@ -258,7 +258,7 @@ export const NonAuthDonationInner: React.FC<Props> = ({ mainContainerCssProps, s
|
|
|
258
258
|
</div>
|
|
259
259
|
{donationType === "recurring"
|
|
260
260
|
&& <Grid container spacing={3} style={{ marginTop: 0 }}>
|
|
261
|
-
<Grid
|
|
261
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
262
262
|
<FormControl fullWidth>
|
|
263
263
|
<InputLabel>{Locale.label("donation.donationForm.frequency")}</InputLabel>
|
|
264
264
|
<Select label="Frequency" name="interval" aria-label="interval" value={interval} onChange={(e) => { setInterval(e.target.value) }}>
|
|
@@ -270,7 +270,7 @@ export const NonAuthDonationInner: React.FC<Props> = ({ mainContainerCssProps, s
|
|
|
270
270
|
</Select>
|
|
271
271
|
</FormControl>
|
|
272
272
|
</Grid>
|
|
273
|
-
<Grid
|
|
273
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
274
274
|
<TextField fullWidth name="startDate" type="date" aria-label="startDate" label={Locale.label("donation.donationForm.startDate")} value={DateHelper.formatHtml5Date(new Date(startDate))} onChange={handleChange} />
|
|
275
275
|
</Grid>
|
|
276
276
|
</Grid>
|
|
@@ -87,7 +87,7 @@ export const PaymentMethods: React.FC<Props> = (props) => {
|
|
|
87
87
|
const getPMIcon = (type: string) => (type === "card" ? <Icon>credit_card</Icon> : <Icon>account_balance</Icon>)
|
|
88
88
|
|
|
89
89
|
const getPaymentRows = () => {
|
|
90
|
-
let rows:
|
|
90
|
+
let rows: React.ReactElement[] = [];
|
|
91
91
|
|
|
92
92
|
props.paymentMethods.forEach((method: StripePaymentMethod) => {
|
|
93
93
|
rows.push(
|
|
@@ -53,7 +53,7 @@ export const RecurringDonations: React.FC<Props> = (props) => {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
const getFunds = (subscription: SubscriptionInterface) => {
|
|
56
|
-
let result:
|
|
56
|
+
let result: React.ReactElement[] = [];
|
|
57
57
|
subscription.funds.forEach((fund: any) => {
|
|
58
58
|
result.push(
|
|
59
59
|
<div key={subscription.id + fund.id}>
|
|
@@ -76,13 +76,13 @@ export const RecurringDonations: React.FC<Props> = (props) => {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
const getTableHeader = () => {
|
|
79
|
-
let result:
|
|
79
|
+
let result: React.ReactElement[] = [];
|
|
80
80
|
result.push(<TableRow key="header" sx={{textAlign: "left"}}><TableCell><b>{Locale.label("donation.recurring.startDate")}</b></TableCell><TableCell><b>{Locale.label("donation.recurring.amount")}</b></TableCell><TableCell><b>{Locale.label("donation.recurring.interval")}</b></TableCell><TableCell><b>{Locale.label("donation.recurring.paymentMethod")}</b></TableCell>{props?.paymentMethods?.length > 0 && <TableCell></TableCell>}</TableRow>);
|
|
81
81
|
return result;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
const getTableRows = () => {
|
|
85
|
-
let rows:
|
|
85
|
+
let rows: React.ReactElement[] = [];
|
|
86
86
|
|
|
87
87
|
subscriptions.forEach((sub: any) => {
|
|
88
88
|
rows.push(
|
|
@@ -56,7 +56,7 @@ export const RecurringDonationsEdit: React.FC<Props> = (props) => {
|
|
|
56
56
|
const getFields = () => (
|
|
57
57
|
<>
|
|
58
58
|
<Grid container spacing={3}>
|
|
59
|
-
<Grid
|
|
59
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
60
60
|
<FormControl fullWidth>
|
|
61
61
|
<InputLabel>{Locale.label("donation.donationForm.method")}</InputLabel>
|
|
62
62
|
<Select label={Locale.label("donation.donationForm.method")} name="method" aria-label="method" value={editSubscription.default_payment_method || editSubscription.default_source} className="capitalize" onChange={handleChange}>
|
|
@@ -64,7 +64,7 @@ export const RecurringDonationsEdit: React.FC<Props> = (props) => {
|
|
|
64
64
|
</Select>
|
|
65
65
|
</FormControl>
|
|
66
66
|
</Grid>
|
|
67
|
-
<Grid
|
|
67
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
68
68
|
<FormControl fullWidth>
|
|
69
69
|
<InputLabel>{Locale.label("donation.donationForm.frequency")}</InputLabel>
|
|
70
70
|
<Select label={Locale.label("donation.donationForm.frequency")} name="interval" aria-label="interval" value={interval} onChange={handleChange}>
|
|
@@ -5,7 +5,7 @@ import { ErrorMessages, FloatingSupport, Loading } from "../components";
|
|
|
5
5
|
import { LoginResponseInterface, UserContextInterface, ChurchInterface, UserInterface, LoginUserChurchInterface } from "@churchapps/helpers";
|
|
6
6
|
import { AnalyticsHelper, ApiHelper, ArrayHelper, Locale, UserHelper } from "../helpers";
|
|
7
7
|
import { useCookies } from "react-cookie"
|
|
8
|
-
import
|
|
8
|
+
import { jwtDecode } from "jwt-decode"
|
|
9
9
|
import { Register } from "./components/Register"
|
|
10
10
|
import { SelectChurchModal } from "./components/SelectChurchModal"
|
|
11
11
|
import { Forgot } from "./components/Forgot";
|
|
@@ -97,7 +97,7 @@ export const LoginPage: React.FC<Props> = ({ showLogo = true, loginContainerCssP
|
|
|
97
97
|
UserHelper.user = resp.user;
|
|
98
98
|
|
|
99
99
|
if (props.jwt) {
|
|
100
|
-
const decoded: any =
|
|
100
|
+
const decoded: any = jwtDecode(userJwtBackup)
|
|
101
101
|
selectedChurchId = decoded.churchId
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -73,12 +73,12 @@ export const SelectChurchRegister: React.FC<Props> = (props) => {
|
|
|
73
73
|
|
|
74
74
|
<TextField required fullWidth name="address1" label={Locale.label("selectChurch.address1")} value={church.address1} onChange={handleChange} />
|
|
75
75
|
<Grid container spacing={3}>
|
|
76
|
-
<Grid
|
|
77
|
-
<Grid
|
|
76
|
+
<Grid size={6}><TextField fullWidth name="address2" label={Locale.label("selectChurch.address2")} value={church.address2} onChange={handleChange} /></Grid>
|
|
77
|
+
<Grid size={6}><TextField required fullWidth name="city" label={Locale.label("selectChurch.city")} value={church.city} onChange={handleChange} /></Grid>
|
|
78
78
|
</Grid>
|
|
79
79
|
<Grid container spacing={3}>
|
|
80
|
-
<Grid
|
|
81
|
-
<Grid
|
|
80
|
+
<Grid size={6}><TextField required fullWidth name="state" label={Locale.label("selectChurch.state")} value={church.state} onChange={handleChange} /></Grid>
|
|
81
|
+
<Grid size={6}><TextField required fullWidth name="zip" label={Locale.label("selectChurch.zip")} value={church.zip} onChange={handleChange} /></Grid>
|
|
82
82
|
</Grid>
|
|
83
83
|
<TextField required fullWidth name="country" label={Locale.label("selectChurch.country")} value={church.country} onChange={handleChange} />
|
|
84
84
|
</InputBox>
|
|
@@ -44,7 +44,7 @@ export const SelectChurchSearch: React.FC<Props> = (props) => {
|
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
const getChurches = () => {
|
|
47
|
-
const result:
|
|
47
|
+
const result: React.ReactElement[] = [];
|
|
48
48
|
churches.forEach(church => {
|
|
49
49
|
result.push(<SelectableChurch church={church} selectChurch={props.selectChurch} />);
|
|
50
50
|
});
|
|
@@ -19,12 +19,12 @@ export const SelectableChurch: React.FC<Props> = (props) => {
|
|
|
19
19
|
}
|
|
20
20
|
return (
|
|
21
21
|
<Grid container spacing={3}>
|
|
22
|
-
<Grid
|
|
22
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
23
23
|
<a href="about:blank" style={{ fontSize: "1.125rem", display: "block", marginTop: 15, marginBottom: 15 }} onClick={(e) => { e.preventDefault(); props.selectChurch(props.church.id) }}>
|
|
24
24
|
<img src={logo} alt="church logo" className="w-100 img-fluid" />
|
|
25
25
|
</a>
|
|
26
26
|
</Grid>
|
|
27
|
-
<Grid
|
|
27
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
28
28
|
<div>
|
|
29
29
|
<a href="about:blank" style={{ fontSize: "1.125rem", display: "block" }} onClick={(e) => { e.preventDefault(); props.selectChurch(props.church.id) }}>{props.church.name}</a>
|
|
30
30
|
{(props.church.address1) && <div>{props.church.address1}</div>}
|