@churchapps/apphelper 0.2.30 → 0.2.32
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/.vscode/settings.json +6 -0
- package/dist/components/B1ShareModal.js +9 -12
- package/dist/components/B1ShareModal.js.map +1 -1
- package/dist/components/CreatePerson.js +4 -4
- package/dist/components/CreatePerson.js.map +1 -1
- package/dist/components/FormSubmissionEdit.js +3 -3
- package/dist/components/FormSubmissionEdit.js.map +1 -1
- package/dist/components/ImageEditor.d.ts.map +1 -1
- package/dist/components/ImageEditor.js +2 -1
- package/dist/components/ImageEditor.js.map +1 -1
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +4 -3
- package/dist/components/InputBox.js.map +1 -1
- package/dist/components/PersonAdd.js +1 -1
- package/dist/components/PersonAdd.js.map +1 -1
- package/dist/components/SupportModal.d.ts.map +1 -1
- package/dist/components/SupportModal.js +14 -5
- package/dist/components/SupportModal.js.map +1 -1
- package/dist/components/gallery/GalleryModal.js +6 -5
- package/dist/components/gallery/GalleryModal.js.map +1 -1
- package/dist/components/gallery/StockPhotos.js +4 -3
- package/dist/components/gallery/StockPhotos.js.map +1 -1
- package/dist/components/iconPicker/IconPicker.d.ts.map +1 -1
- package/dist/components/iconPicker/IconPicker.js +10 -3
- package/dist/components/iconPicker/IconPicker.js.map +1 -1
- package/dist/components/markdownEditor/MarkdownModal.d.ts.map +1 -1
- package/dist/components/markdownEditor/MarkdownModal.js +6 -4
- package/dist/components/markdownEditor/MarkdownModal.js.map +1 -1
- package/dist/components/notes/AddNote.js +1 -1
- package/dist/components/notes/AddNote.js.map +1 -1
- package/dist/components/notes/Conversation.js +5 -3
- package/dist/components/notes/Conversation.js.map +1 -1
- package/dist/components/notes/NewConversation.js +2 -2
- package/dist/components/notes/NewConversation.js.map +1 -1
- package/dist/components/notes/Notes.js +1 -1
- package/dist/components/notes/Notes.js.map +1 -1
- package/dist/components/reporting/ChartReport.d.ts.map +1 -1
- package/dist/components/reporting/ChartReport.js +2 -1
- package/dist/components/reporting/ChartReport.js.map +1 -1
- package/dist/components/reporting/ReportFilter.js +1 -1
- package/dist/components/reporting/ReportFilter.js.map +1 -1
- package/dist/components/reporting/ReportFilterField.d.ts.map +1 -1
- package/dist/components/reporting/ReportFilterField.js +2 -2
- package/dist/components/reporting/ReportFilterField.js.map +1 -1
- package/dist/components/reporting/ReportOutput.d.ts.map +1 -1
- package/dist/components/reporting/ReportOutput.js +6 -8
- package/dist/components/reporting/ReportOutput.js.map +1 -1
- package/dist/components/wrapper/ChurchList.d.ts.map +1 -1
- package/dist/components/wrapper/ChurchList.js +4 -2
- package/dist/components/wrapper/ChurchList.js.map +1 -1
- package/dist/components/wrapper/NavItem.d.ts.map +1 -1
- package/dist/components/wrapper/NavItem.js +5 -3
- package/dist/components/wrapper/NavItem.js.map +1 -1
- package/dist/components/wrapper/NewPrivateMessage.js +5 -5
- package/dist/components/wrapper/NewPrivateMessage.js.map +1 -1
- package/dist/components/wrapper/NotificationMenu.d.ts.map +1 -1
- package/dist/components/wrapper/NotificationMenu.js.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.d.ts.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.js +3 -1
- package/dist/components/wrapper/PrivateMessageDetails.js.map +1 -1
- package/dist/components/wrapper/UserMenu.d.ts.map +1 -1
- package/dist/components/wrapper/UserMenu.js +7 -6
- package/dist/components/wrapper/UserMenu.js.map +1 -1
- package/dist/donationComponents/DonationPage.js +6 -6
- package/dist/donationComponents/DonationPage.js.map +1 -1
- package/dist/donationComponents/components/BankForm.js +15 -15
- package/dist/donationComponents/components/BankForm.js.map +1 -1
- package/dist/donationComponents/components/CardForm.js +5 -5
- package/dist/donationComponents/components/CardForm.js.map +1 -1
- package/dist/donationComponents/components/DonationForm.js +22 -22
- package/dist/donationComponents/components/DonationForm.js.map +1 -1
- package/dist/donationComponents/components/FundDonation.d.ts.map +1 -1
- package/dist/donationComponents/components/FundDonation.js +4 -3
- package/dist/donationComponents/components/FundDonation.js.map +1 -1
- package/dist/donationComponents/components/FundDonations.d.ts.map +1 -1
- package/dist/donationComponents/components/FundDonations.js +2 -1
- package/dist/donationComponents/components/FundDonations.js.map +1 -1
- package/dist/donationComponents/components/NonAuthDonationInner.js +22 -23
- package/dist/donationComponents/components/NonAuthDonationInner.js.map +1 -1
- package/dist/donationComponents/components/PaymentMethods.js +8 -6
- package/dist/donationComponents/components/PaymentMethods.js.map +1 -1
- package/dist/donationComponents/components/RecurringDonations.js +7 -6
- package/dist/donationComponents/components/RecurringDonations.js.map +1 -1
- package/dist/donationComponents/components/RecurringDonationsEdit.js +13 -13
- package/dist/donationComponents/components/RecurringDonationsEdit.js.map +1 -1
- package/dist/donationComponents/modals/DonationPreviewModal.js +32 -12
- package/dist/donationComponents/modals/DonationPreviewModal.js.map +1 -1
- package/dist/helpers/Locale.d.ts +7 -0
- package/dist/helpers/Locale.d.ts.map +1 -0
- package/dist/helpers/Locale.js +56 -0
- package/dist/helpers/Locale.js.map +1 -0
- package/dist/helpers/PersonHelper.d.ts.map +1 -1
- package/dist/helpers/PersonHelper.js +2 -1
- package/dist/helpers/PersonHelper.js.map +1 -1
- package/dist/helpers/ReportHelper.d.ts.map +1 -1
- package/dist/helpers/ReportHelper.js.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +3 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/pageComponents/LoginPage.js +5 -8
- package/dist/pageComponents/LoginPage.js.map +1 -1
- package/dist/pageComponents/components/Forgot.js +11 -10
- package/dist/pageComponents/components/Forgot.js.map +1 -1
- package/dist/pageComponents/components/Login.d.ts.map +1 -1
- package/dist/pageComponents/components/Login.js +9 -8
- package/dist/pageComponents/components/Login.js.map +1 -1
- package/dist/pageComponents/components/LoginSetPassword.js +8 -7
- package/dist/pageComponents/components/LoginSetPassword.js.map +1 -1
- package/dist/pageComponents/components/Register.d.ts.map +1 -1
- package/dist/pageComponents/components/Register.js +6 -8
- package/dist/pageComponents/components/Register.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchModal.d.ts.map +1 -1
- package/dist/pageComponents/components/SelectChurchModal.js +3 -2
- package/dist/pageComponents/components/SelectChurchModal.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchRegister.d.ts.map +1 -1
- package/dist/pageComponents/components/SelectChurchRegister.js +14 -19
- package/dist/pageComponents/components/SelectChurchRegister.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchSearch.js +4 -4
- package/dist/pageComponents/components/SelectChurchSearch.js.map +1 -1
- package/dist/public/locales/de.json +271 -0
- package/dist/public/locales/en.json +271 -0
- package/dist/public/locales/es.json +273 -0
- package/dist/public/locales/fr.json +271 -0
- package/dist/public/locales/hi.json +271 -0
- package/dist/public/locales/it.json +271 -0
- package/dist/public/locales/ko.json +271 -0
- package/dist/public/locales/no.json +271 -0
- package/dist/public/locales/pt.json +271 -0
- package/dist/public/locales/ru.json +271 -0
- package/dist/public/locales/tl.json +271 -0
- package/dist/public/locales/zh.json +271 -0
- package/package.json +3 -2
- package/public/locales/de.json +271 -0
- package/public/locales/en.json +271 -0
- package/public/locales/es.json +273 -0
- package/public/locales/fr.json +271 -0
- package/public/locales/hi.json +271 -0
- package/public/locales/it.json +271 -0
- package/public/locales/ko.json +271 -0
- package/public/locales/no.json +271 -0
- package/public/locales/pt.json +271 -0
- package/public/locales/ru.json +271 -0
- package/public/locales/tl.json +271 -0
- package/public/locales/zh.json +271 -0
- package/src/components/B1ShareModal.tsx +10 -10
- package/src/components/CreatePerson.tsx +5 -5
- package/src/components/FormSubmissionEdit.tsx +5 -5
- package/src/components/ImageEditor.tsx +2 -1
- package/src/components/InputBox.tsx +4 -3
- package/src/components/PersonAdd.tsx +3 -3
- package/src/components/SupportModal.tsx +5 -4
- package/src/components/gallery/GalleryModal.tsx +6 -6
- package/src/components/gallery/StockPhotos.tsx +3 -3
- package/src/components/iconPicker/IconPicker.tsx +4 -3
- package/src/components/markdownEditor/MarkdownModal.tsx +5 -4
- package/src/components/notes/AddNote.tsx +2 -2
- package/src/components/notes/Conversation.tsx +3 -3
- package/src/components/notes/NewConversation.tsx +3 -3
- package/src/components/notes/Notes.tsx +2 -2
- package/src/components/reporting/ChartReport.tsx +2 -1
- package/src/components/reporting/ReportFilter.tsx +2 -2
- package/src/components/reporting/ReportFilterField.tsx +4 -3
- package/src/components/reporting/ReportOutput.tsx +6 -8
- package/src/components/wrapper/ChurchList.tsx +13 -11
- package/src/components/wrapper/NavItem.tsx +9 -7
- package/src/components/wrapper/NewPrivateMessage.tsx +6 -6
- package/src/components/wrapper/NotificationMenu.tsx +0 -1
- package/src/components/wrapper/PrivateMessageDetails.tsx +2 -1
- package/src/components/wrapper/UserMenu.tsx +8 -9
- package/src/donationComponents/DonationPage.tsx +7 -7
- package/src/donationComponents/components/BankForm.tsx +16 -16
- package/src/donationComponents/components/CardForm.tsx +6 -6
- package/src/donationComponents/components/DonationForm.tsx +21 -21
- package/src/donationComponents/components/FundDonation.tsx +4 -3
- package/src/donationComponents/components/FundDonations.tsx +2 -1
- package/src/donationComponents/components/NonAuthDonationInner.tsx +22 -22
- package/src/donationComponents/components/PaymentMethods.tsx +7 -7
- package/src/donationComponents/components/RecurringDonations.tsx +4 -4
- package/src/donationComponents/components/RecurringDonationsEdit.tsx +14 -14
- package/src/donationComponents/modals/DonationPreviewModal.tsx +13 -13
- package/src/helpers/Locale.ts +47 -0
- package/src/helpers/PersonHelper.ts +2 -1
- package/src/helpers/ReportHelper.ts +0 -1
- package/src/helpers/index.ts +1 -0
- package/src/pageComponents/LoginPage.tsx +6 -6
- package/src/pageComponents/components/Forgot.tsx +10 -10
- package/src/pageComponents/components/Login.tsx +9 -8
- package/src/pageComponents/components/LoginSetPassword.tsx +8 -8
- package/src/pageComponents/components/Register.tsx +7 -13
- package/src/pageComponents/components/SelectChurchModal.tsx +4 -2
- package/src/pageComponents/components/SelectChurchRegister.tsx +16 -21
- package/src/pageComponents/components/SelectChurchSearch.tsx +5 -5
|
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useRef } from "react";
|
|
|
2
2
|
import Cropper from "react-cropper";
|
|
3
3
|
import "cropperjs/dist/cropper.css";
|
|
4
4
|
import { InputBox, SmallButton } from ".";
|
|
5
|
+
import { Locale } from "../helpers";
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
title?: string;
|
|
@@ -105,7 +106,7 @@ export function ImageEditor(props: Props) {
|
|
|
105
106
|
headerIcon=""
|
|
106
107
|
headerText={props.title}
|
|
107
108
|
ariaLabelDelete="deletePhoto"
|
|
108
|
-
saveText="
|
|
109
|
+
saveText={Locale.label("common.update")}
|
|
109
110
|
saveFunction={handleSave}
|
|
110
111
|
cancelFunction={props.onCancel}
|
|
111
112
|
deleteFunction={(!props.hideDelete) && handleDelete}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Paper, Box, Typography, Stack, styled, Button, Icon, PaperProps } from "@mui/material";
|
|
3
3
|
import { HelpIcon } from "./HelpIcon";
|
|
4
|
+
import { Locale } from "../helpers";
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
id?: string;
|
|
@@ -41,9 +42,9 @@ const CustomContextBox = styled(Box)({
|
|
|
41
42
|
|
|
42
43
|
export function InputBox({ mainContainerCssProps = {}, ...props }: Props) {
|
|
43
44
|
let buttons = [];
|
|
44
|
-
if (props.cancelFunction) buttons.push(<Button key="cancel" onClick={props.cancelFunction} color="warning" sx={{ "&:focus": { outline: "none" } }}>{props.cancelText || "
|
|
45
|
-
if (props.deleteFunction) buttons.push(<Button key="delete" id="delete" variant="outlined" aria-label={props.ariaLabelDelete} onClick={props.deleteFunction} color="error" sx={{ "&:focus": { outline: "none" } }}>{props.deleteText || "
|
|
46
|
-
if (props.saveFunction) buttons.push(<Button key="save" type={props.saveButtonType || "button"} variant="contained" disableElevation aria-label={props.ariaLabelSave} onClick={props.saveFunction} disabled={props.isSubmitting} sx={{ "&:focus": { outline: "none" } }}>{props.saveText || "
|
|
45
|
+
if (props.cancelFunction) buttons.push(<Button key="cancel" onClick={props.cancelFunction} color="warning" sx={{ "&:focus": { outline: "none" } }}>{props.cancelText || Locale.label("common.cancel")}</Button>);
|
|
46
|
+
if (props.deleteFunction) buttons.push(<Button key="delete" id="delete" variant="outlined" aria-label={props.ariaLabelDelete} onClick={props.deleteFunction} color="error" sx={{ "&:focus": { outline: "none" } }}>{props.deleteText || Locale.label("common.delete")}</Button>);
|
|
47
|
+
if (props.saveFunction) buttons.push(<Button key="save" type={props.saveButtonType || "button"} variant="contained" disableElevation aria-label={props.ariaLabelSave} onClick={props.saveFunction} disabled={props.isSubmitting} sx={{ "&:focus": { outline: "none" } }}>{props.saveText || Locale.label("common.save")}</Button>);
|
|
47
48
|
|
|
48
49
|
let classNames = ["inputBox"];
|
|
49
50
|
if (props.className) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { ApiHelper } from "../helpers";
|
|
2
|
+
import { ApiHelper, Locale } from "../helpers";
|
|
3
3
|
import { PersonInterface } from "@churchapps/helpers"
|
|
4
4
|
import { TextField, Button, Table, TableBody, TableRow, TableCell } from "@mui/material";
|
|
5
5
|
import { SmallButton } from "./SmallButton";
|
|
@@ -63,8 +63,8 @@ export const PersonAdd: React.FC<Props> = ({ addFunction, getPhotoUrl, searchCli
|
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
65
|
<>
|
|
66
|
-
<TextField fullWidth name="personAddText" label="
|
|
67
|
-
InputProps={{ endAdornment: <Button variant="contained" id="searchButton" data-cy="search-button" onClick={handleSearch}>
|
|
66
|
+
<TextField fullWidth name="personAddText" label={Locale.label("person.person")} value={searchText} onChange={handleChange} onKeyDown={handleKeyDown}
|
|
67
|
+
InputProps={{ endAdornment: <Button variant="contained" id="searchButton" data-cy="search-button" onClick={handleSearch}>{Locale.label("common.search")}</Button> }}
|
|
68
68
|
/>
|
|
69
69
|
{showCreatePersonOnNotFound && hasSearched && searchText && searchResults.length === 0 && (
|
|
70
70
|
<CreatePerson navigateOnCreate={false} onCreate={person => { setSearchText(""); setSearchResults([person]) }} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Icon, Stack } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { Locale } from "../helpers";
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
5
6
|
appName?: string
|
|
@@ -13,10 +14,10 @@ export const SupportModal: React.FC<Props> = ({ appName = "", onClose }) => {
|
|
|
13
14
|
<Dialog open={true} onClose={onClose}>
|
|
14
15
|
<DialogTitle>Get Support</DialogTitle>
|
|
15
16
|
<DialogContent>
|
|
16
|
-
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>mail</Icon>
|
|
17
|
-
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>phone_iphone</Icon>
|
|
18
|
-
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>forum</Icon>
|
|
19
|
-
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>info</Icon>
|
|
17
|
+
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>mail</Icon> {Locale.label("support.email")}:</Stack></b> <a href={"mailto:support@livecs.org" + subject}>support@churchapps.org</a></Stack>
|
|
18
|
+
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>phone_iphone</Icon> {Locale.label("support.phone")}:</Stack></b> <a href="tel:+19189942638">+1 (918) 994-2638</a></Stack>
|
|
19
|
+
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>forum</Icon> {Locale.label("support.messenger")}:</Stack></b> <a href="https://m.me/livecsolutions" target="_new">https://m.me/livecsolutions</a></Stack>
|
|
20
|
+
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>info</Icon> {Locale.label("support.knowledgeBase")}:</Stack></b> <a href="https://support.churchapps.org" target="_new">https://support.churchapps.org</a></Stack>
|
|
20
21
|
</DialogContent>
|
|
21
22
|
<DialogActions sx={{ paddingX: "16px", paddingBottom: "12px" }}>
|
|
22
23
|
<Button variant="outlined" onClick={onClose}>Close</Button>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileHelper, ApiHelper } from "../../helpers";
|
|
1
|
+
import { FileHelper, ApiHelper, Locale } from "../../helpers";
|
|
2
2
|
import { CommonEnvironmentHelper } from "../../helpers/CommonEnvironmentHelper";
|
|
3
3
|
import { } from "../../helpers";
|
|
4
4
|
import { Box, Button, Dialog, DialogActions, DialogContent, DialogTitle, FormControl, Grid, IconButton, InputLabel, MenuItem, Select, Tab, Tabs, Tooltip, Icon } from "@mui/material";
|
|
@@ -38,7 +38,7 @@ export const GalleryModal: React.FC<Props> = (props: Props) => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const handleDelete = (folder: string, image: string) => {
|
|
41
|
-
if (window.confirm("
|
|
41
|
+
if (window.confirm(Locale.label("gallery.confirmDelete"))){
|
|
42
42
|
ApiHelper.delete("/gallery/" + folder + "/" + image, "ContentApi").then(() => { loadData(); });
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -101,9 +101,9 @@ export const GalleryModal: React.FC<Props> = (props: Props) => {
|
|
|
101
101
|
<TabPanel value={tabIndex} index={0}>
|
|
102
102
|
{(props.aspectRatio === 0) && (
|
|
103
103
|
<FormControl fullWidth>
|
|
104
|
-
<InputLabel>
|
|
105
|
-
<Select size="small" label="
|
|
106
|
-
<MenuItem value="0">
|
|
104
|
+
<InputLabel>{Locale.label("gallery.aspectRatio")}</InputLabel>
|
|
105
|
+
<Select size="small" label={Locale.label("gallery.aspectRatio")} name="aspectRatio" value={aspectRatio} onChange={(e) => setAspectRatio(parseFloat(e.target.value.toString()))}>
|
|
106
|
+
<MenuItem value="0">{Locale.label("gallery.freeForm")}</MenuItem>
|
|
107
107
|
<MenuItem value="1">1:1</MenuItem>
|
|
108
108
|
<MenuItem value="2">2:1</MenuItem>
|
|
109
109
|
<MenuItem value="3">3:1</MenuItem>
|
|
@@ -120,7 +120,7 @@ export const GalleryModal: React.FC<Props> = (props: Props) => {
|
|
|
120
120
|
</Grid>
|
|
121
121
|
</TabPanel>
|
|
122
122
|
<TabPanel value={tabIndex} index={1}>
|
|
123
|
-
<div>
|
|
123
|
+
<div>{Locale.label("gallery.aspectRatio")}: {getDisplayAspect()}</div>
|
|
124
124
|
<ImageEditor onUpdate={handleImageUpdated} photoUrl={editorPhotoUrl} aspectRatio={aspectRatio} outputWidth={1280} outputHeight={768} hideDelete={true} />
|
|
125
125
|
</TabPanel>
|
|
126
126
|
<TabPanel value={tabIndex} index={2}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button, Grid, TextField } from "@mui/material";
|
|
2
2
|
import React, { useState } from "react";
|
|
3
|
-
import { ApiHelper } from "../../helpers";
|
|
3
|
+
import { ApiHelper, Locale } from "../../helpers";
|
|
4
4
|
import { CommonEnvironmentHelper } from "../../helpers/CommonEnvironmentHelper";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
@@ -42,7 +42,7 @@ export const StockPhotos: React.FC<Props> = (props: Props) => {
|
|
|
42
42
|
</a>
|
|
43
43
|
<div>
|
|
44
44
|
<i style={{ fontSize: 12 }}>
|
|
45
|
-
<a href={p.url} target="_blank" rel="noreferrer noopener">
|
|
45
|
+
<a href={p.url} target="_blank" rel="noreferrer noopener">{Locale.label("stockPhotos.photoBy")}</a> <a href={p.photographerUrl} target="_blank" rel="noreferrer noopener">{p.photographer}</a></i>
|
|
46
46
|
</div>
|
|
47
47
|
</Grid>);
|
|
48
48
|
})
|
|
@@ -65,7 +65,7 @@ export const StockPhotos: React.FC<Props> = (props: Props) => {
|
|
|
65
65
|
<TextField fullWidth name="personAddText" label="Search Term" value={searchText} onChange={handleChange}
|
|
66
66
|
InputProps={{ endAdornment: <Button variant="contained" id="searchButton" data-cy="search-button" onClick={handleSearch}>Search</Button> }}
|
|
67
67
|
/>
|
|
68
|
-
{searchResults && <div>
|
|
68
|
+
{searchResults && <div>{Locale.label("stockPhotos.providedBy")} <a href="https://pexels.com">Pexels</a>.</div>}
|
|
69
69
|
<Grid container spacing={3} alignItems="center">
|
|
70
70
|
{getImages()}
|
|
71
71
|
</Grid>
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { styled, Icon, InputBase, Typography, debounce, Grid, IconButton, Pagination, Stack } from "@mui/material";
|
|
3
3
|
import MuiPaper from "@mui/material/Paper";
|
|
4
4
|
import IconNamesList from "./IconNamesList"
|
|
5
|
+
import { Locale } from "../../helpers";
|
|
5
6
|
//import FlexSearch from "flexsearch";
|
|
6
7
|
const UPDATE_SEARCH_INDEX_WAIT_MS = 220;
|
|
7
8
|
|
|
@@ -141,10 +142,10 @@ export function IconPicker(props: Props) {
|
|
|
141
142
|
<IconButton sx={{ padding: "10px" }} aria-label="search">
|
|
142
143
|
<Icon>search</Icon>
|
|
143
144
|
</IconButton>
|
|
144
|
-
<Input autoFocus value={query} onChange={(event) => setQuery(event.target.value)} placeholder="
|
|
145
|
+
<Input autoFocus value={query} onChange={(event) => setQuery(event.target.value)} placeholder={Locale.label("iconPicker.searchIcons")} inputProps={{ "aria-label": "search icons" }} />
|
|
145
146
|
</Paper>
|
|
146
|
-
{(query === "") && <Typography sx={{ mb: 1 }}>{
|
|
147
|
-
{(query !== "") && <Typography sx={{ mb: 1 }}>{
|
|
147
|
+
{(query === "") && <Typography sx={{ mb: 1 }}>{IconNamesList.length} {Locale.label("iconPicker.iconsAvailable")}</Typography>}
|
|
148
|
+
{(query !== "") && <Typography sx={{ mb: 1 }}>{icons.length} {Locale.label("iconPicker.matchingResults")}</Typography>}
|
|
148
149
|
|
|
149
150
|
<Icons icons={paged(icons, page)} handleOpenClick={props.onSelect} />
|
|
150
151
|
</Grid>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Grid, TextField } from "@mui/material";
|
|
3
3
|
import { MarkdownPreview } from "./MarkdownPreview";
|
|
4
|
+
import { Locale } from "../../helpers";
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
hideModal: () => void
|
|
@@ -8,7 +9,7 @@ interface Props {
|
|
|
8
9
|
value?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
const guideLink = <a href="https://www.markdownguide.org/cheat-sheet/" target="_blank" rel="noopener noreferrer" style={{ float: "right" }}>
|
|
12
|
+
const guideLink = <a href="https://www.markdownguide.org/cheat-sheet/" target="_blank" rel="noopener noreferrer" style={{ float: "right" }}>{Locale.label("markdownEditor.markdownGuide")}</a>;
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
export const MarkdownModal: React.FC<Props> = ({ value, onChange, hideModal }) => {
|
|
@@ -23,11 +24,11 @@ export const MarkdownModal: React.FC<Props> = ({ value, onChange, hideModal }) =
|
|
|
23
24
|
useEffect(() => { onChange(inputVal); }, [inputVal, onChange]);
|
|
24
25
|
|
|
25
26
|
return (<Dialog open={true} onClose={() => { hideModal() }} fullScreen={true}>
|
|
26
|
-
<DialogTitle>
|
|
27
|
+
<DialogTitle>{Locale.label("markdownEditor.markdownGuide")}</DialogTitle>
|
|
27
28
|
<DialogContent>
|
|
28
29
|
<Grid container spacing={3}>
|
|
29
30
|
<Grid item xs={6}>
|
|
30
|
-
<TextField fullWidth multiline label={<>
|
|
31
|
+
<TextField fullWidth multiline label={<>{Locale.label("markdownEditor.content")} {guideLink}</>} name="modalMarkdown" className="modalMarkdown" InputProps={{ style: { height: "80vh" } }} value={inputVal} onChange={(e) => {
|
|
31
32
|
setInputVal(e.target.value);
|
|
32
33
|
}} placeholder="" />
|
|
33
34
|
</Grid>
|
|
@@ -40,7 +41,7 @@ export const MarkdownModal: React.FC<Props> = ({ value, onChange, hideModal }) =
|
|
|
40
41
|
</Grid>
|
|
41
42
|
</DialogContent>
|
|
42
43
|
<DialogActions sx={{ paddingX: "16px", paddingBottom: "12px" }}>
|
|
43
|
-
<Button variant="outlined" onClick={() => { hideModal() }}>
|
|
44
|
+
<Button variant="outlined" onClick={() => { hideModal() }}>{Locale.label("common.close")}</Button>
|
|
44
45
|
</DialogActions>
|
|
45
46
|
</Dialog>)
|
|
46
47
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from "react"
|
|
2
|
-
import { ApiHelper, PersonHelper } from "../../helpers"
|
|
2
|
+
import { ApiHelper, Locale, PersonHelper } from "../../helpers"
|
|
3
3
|
import { MessageInterface, UserContextInterface } from "@churchapps/helpers"
|
|
4
4
|
import { Icon, Stack, TextField } from "@mui/material"
|
|
5
5
|
import { ErrorMessages } from "../ErrorMessages"
|
|
@@ -36,7 +36,7 @@ export function AddNote({ context, ...props }: Props) {
|
|
|
36
36
|
|
|
37
37
|
const validate = () => {
|
|
38
38
|
const result = [];
|
|
39
|
-
if (!message.content.trim()) result.push("
|
|
39
|
+
if (!message.content.trim()) result.push(Locale.label("notes.validate.content"));
|
|
40
40
|
setErrors(result);
|
|
41
41
|
return result.length === 0;
|
|
42
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Box, Paper, Stack } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { ApiHelper, ArrayHelper, DateHelper, PersonHelper } from "../../helpers";
|
|
3
|
+
import { ApiHelper, ArrayHelper, DateHelper, Locale, PersonHelper } from "../../helpers";
|
|
4
4
|
import { ConversationInterface, MessageInterface, UserContextInterface } from "@churchapps/helpers";
|
|
5
5
|
import { AddNote } from "./AddNote";
|
|
6
6
|
import { Note } from "./Note";
|
|
@@ -65,8 +65,8 @@ export function Conversation(props: Props) {
|
|
|
65
65
|
</div>
|
|
66
66
|
{props.showCommentCount && (
|
|
67
67
|
<div className="commentCount">
|
|
68
|
-
<div>{(conversation.postCount === 1) ? "1 comment" : conversation.postCount + " comments"}</div>
|
|
69
|
-
{(conversation.postCount > conversation.messages.length) ? <a href="about:blank" onClick={(e) => { e.preventDefault(); loadNotes(); }}>
|
|
68
|
+
<div>{(conversation.postCount === 1) ? "1 " + Locale.label("notes.comment") : conversation.postCount + " " + Locale.label("notes.comments")}</div>
|
|
69
|
+
{(conversation.postCount > conversation.messages.length) ? <a href="about:blank" onClick={(e) => { e.preventDefault(); loadNotes(); }}>{Locale.label("notes.viewAll")} {conversation.postCount} {Locale.label("notes.comments")}</a> : <> </>}
|
|
70
70
|
</div>
|
|
71
71
|
)}
|
|
72
72
|
<div className="messages">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon, Paper, Stack, TextField } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { ApiHelper, PersonHelper } from "../../helpers";
|
|
3
|
+
import { ApiHelper, Locale, PersonHelper } from "../../helpers";
|
|
4
4
|
import { ConversationInterface, MessageInterface, UserContextInterface } from "@churchapps/helpers";
|
|
5
5
|
import { ErrorMessages } from "../ErrorMessages";
|
|
6
6
|
import { SmallButton } from "../SmallButton";
|
|
@@ -28,7 +28,7 @@ export function NewConversation({ context, ...props }: Props) {
|
|
|
28
28
|
|
|
29
29
|
const validate = () => {
|
|
30
30
|
const result = [];
|
|
31
|
-
if (!message.content.trim()) result.push("
|
|
31
|
+
if (!message.content.trim()) result.push(Locale.label("notes.validate.content"));
|
|
32
32
|
setErrors(result);
|
|
33
33
|
return result.length === 0;
|
|
34
34
|
}
|
|
@@ -66,7 +66,7 @@ export function NewConversation({ context, ...props }: Props) {
|
|
|
66
66
|
{image ? <img src={image} alt="user" style={{ width: 60, height: 45, borderRadius: 5, marginLeft: 8 }} /> : <Icon>person</Icon>}
|
|
67
67
|
<Stack direction="column" spacing={2} style={{ width: "100%" }} justifyContent="end">
|
|
68
68
|
<div><b>{context?.person?.name?.display}</b></div>
|
|
69
|
-
<TextField fullWidth name="noteText" aria-label={"
|
|
69
|
+
<TextField fullWidth name="noteText" aria-label={Locale.label("notes.startConversation")} placeholder={Locale.label("notes.startConversation")} multiline style={{ marginTop: 0, border: "none" }} variant="standard" onChange={handleChange} value={message.content} />
|
|
70
70
|
</Stack>
|
|
71
71
|
<Stack direction="column" spacing={1} justifyContent="end">
|
|
72
72
|
<SmallButton icon="send" onClick={handleSave} disabled={isSubmitting} />
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Note } from "./Note";
|
|
3
3
|
import { AddNote } from "./AddNote";
|
|
4
4
|
import { DisplayBox, Loading } from "../";
|
|
5
|
-
import { ApiHelper, ArrayHelper } from "../../helpers";
|
|
5
|
+
import { ApiHelper, ArrayHelper, Locale } from "../../helpers";
|
|
6
6
|
import { MessageInterface, UserContextInterface } from "@churchapps/helpers";
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
@@ -65,5 +65,5 @@ export function Notes(props: Props) {
|
|
|
65
65
|
{messages && (<AddNote context={props.context} conversationId={props.conversationId} onUpdate={loadNotes} createConversation={props.createConversation} messageId={editMessageId} />)}
|
|
66
66
|
</>
|
|
67
67
|
if (props.noDisplayBox) return result;
|
|
68
|
-
else return (<DisplayBox id="notesBox" data-cy="notes-box" headerIcon="sticky_note_2" headerText="
|
|
68
|
+
else return (<DisplayBox id="notesBox" data-cy="notes-box" headerIcon="sticky_note_2" headerText={Locale.label("notes.notes")}>{result}</DisplayBox>);
|
|
69
69
|
};
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Chart } from "react-google-charts";
|
|
3
3
|
import { ReportOutputInterface, ReportResultInterface } from "@churchapps/helpers";
|
|
4
4
|
import { ReportHelper } from "../../helpers/ReportHelper";
|
|
5
|
+
import { Locale } from "../../helpers";
|
|
5
6
|
|
|
6
7
|
interface Props { reportResult: ReportResultInterface, output: ReportOutputInterface }
|
|
7
8
|
|
|
@@ -78,7 +79,7 @@ export const ChartReport = (props: Props) => {
|
|
|
78
79
|
return rows;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
let result = <p>
|
|
82
|
+
let result = <p>{Locale.label("reporting.noData")}</p>
|
|
82
83
|
if (props.reportResult.table?.length > 0) result = (<Chart chartType="ColumnChart" data={getChartData()} width="100%" height="400px" options={{ height: 400, legend: { position: "top", maxLines: 3 }, bar: { groupWidth: "75%" }, isStacked: true }} />);
|
|
83
84
|
|
|
84
85
|
return result;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ReportInterface, ParameterInterface } from "@churchapps/helpers";
|
|
3
|
-
import { ArrayHelper } from "../../helpers"
|
|
3
|
+
import { ArrayHelper, Locale } from "../../helpers"
|
|
4
4
|
import { InputBox } from "../"
|
|
5
5
|
import { ReportFilterField } from "./ReportFilterField";
|
|
6
6
|
|
|
@@ -47,7 +47,7 @@ export const ReportFilter = (props: Props) => {
|
|
|
47
47
|
|
|
48
48
|
const inputs = getInputs();
|
|
49
49
|
if (inputs.length > 0) {
|
|
50
|
-
return <InputBox id="formSubmissionBox" headerText="Filter Report" headerIcon="summarize" saveFunction={props.onRun} saveText="
|
|
50
|
+
return <InputBox id="formSubmissionBox" headerText="Filter Report" headerIcon="summarize" saveFunction={props.onRun} saveText={Locale.label("reporting.runReport")}>
|
|
51
51
|
{inputs}
|
|
52
52
|
</InputBox>
|
|
53
53
|
} else return <> </>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ReportInterface, ParameterInterface } from "@churchapps/helpers";
|
|
3
|
-
import { ApiHelper, ArrayHelper, DateHelper } from "../../helpers";
|
|
3
|
+
import { ApiHelper, ArrayHelper, DateHelper, Locale } from "../../helpers";
|
|
4
4
|
import { FormControl, InputLabel, Select, SelectChangeEvent, TextField, MenuItem } from "@mui/material";
|
|
5
5
|
import { useMountedState } from "../../hooks/useMountedState";
|
|
6
6
|
|
|
@@ -73,7 +73,8 @@ export const ReportFilterField = (props: Props) => {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
const getMonths = () => {
|
|
76
|
-
const list = ["
|
|
76
|
+
const list = [Locale.label("month.january"), Locale.label("month.february"), Locale.label("month.march"), Locale.label("month.april"), Locale.label("month.may"), Locale.label("month.june"), Locale.label("month.july"), Locale.label("month.august"), Locale.label("month.september"), Locale.label("month.october"), Locale.label("month.november"), Locale.label("month.december")]
|
|
77
|
+
|
|
77
78
|
const result = [];
|
|
78
79
|
for (let i = 0; i < list.length; i++) result.push({ value: (i + 1).toString(), text: list[i] });
|
|
79
80
|
return result;
|
|
@@ -152,7 +153,7 @@ export const ReportFilterField = (props: Props) => {
|
|
|
152
153
|
);
|
|
153
154
|
break;
|
|
154
155
|
case "date":
|
|
155
|
-
result = (<TextField type="date" fullWidth InputLabelProps={{shrink: true}} label="
|
|
156
|
+
result = (<TextField type="date" fullWidth InputLabelProps={{shrink: true}} label={Locale.label("common.date")} value={props.parameter.value || ""} onChange={handleChange} name={props.parameter.keyName} />)
|
|
156
157
|
break;
|
|
157
158
|
}
|
|
158
159
|
return result;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { ArrayHelper, PersonInterface, ReportInterface, ReportResultInterface } from "@churchapps/helpers";
|
|
3
3
|
import { DisplayBox, ExportLink, Loading } from "../"
|
|
4
|
-
import { ApiHelper } from "../../helpers"
|
|
4
|
+
import { ApiHelper, Locale } from "../../helpers"
|
|
5
5
|
import { useReactToPrint } from "react-to-print";
|
|
6
6
|
import { TableReport } from "./TableReport";
|
|
7
7
|
import { ChartReport } from "./ChartReport";
|
|
@@ -62,9 +62,7 @@ export const ReportOutput = (props: Props) => {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
//set custom headers
|
|
65
|
-
const maxKeysObj = result?.reduce((a, b) =>
|
|
66
|
-
return Object.keys(a).length > Object.keys(b).length ? a : b;
|
|
67
|
-
}, []);
|
|
65
|
+
const maxKeysObj = result?.reduce((a, b) => Object.keys(a).length > Object.keys(b).length ? a : b, []);
|
|
68
66
|
const objKeys = Object.keys(maxKeysObj);
|
|
69
67
|
objKeys.forEach(key => headers.push({ label: key, key: key }));
|
|
70
68
|
|
|
@@ -101,10 +99,10 @@ export const ReportOutput = (props: Props) => {
|
|
|
101
99
|
setAnchorEl(null);
|
|
102
100
|
}
|
|
103
101
|
return (<>
|
|
104
|
-
<Button size="small" title="
|
|
102
|
+
<Button size="small" title={Locale.label("reporting.downloadOptions")} onClick={handleClick} key={key}><Icon>download</Icon></Button>
|
|
105
103
|
<Menu anchorEl={anchorEl} open={open} onClose={handleClose}>
|
|
106
|
-
{reportResult?.table?.length > 0 && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><ExportLink data={reportResult.table} filename={props.report.displayName.replace(" ", "_") + ".csv"} text="
|
|
107
|
-
{detailedPersonSummary?.length > 0 && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><ExportLink data={detailedPersonSummary} filename="Detailed_Donation_Summary.csv" text="
|
|
104
|
+
{reportResult?.table?.length > 0 && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><ExportLink data={reportResult.table} filename={props.report.displayName.replace(" ", "_") + ".csv"} text={Locale.label("reporting.detailedSummary")} icon="volunteer_activism" /></MenuItem>}
|
|
105
|
+
{detailedPersonSummary?.length > 0 && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><ExportLink data={detailedPersonSummary} filename="Detailed_Donation_Summary.csv" text={Locale.label("reporting.detailedSummary")} icon="person" customHeaders={customHeaders} spaceAfter={true} /></MenuItem>}
|
|
108
106
|
</Menu>
|
|
109
107
|
</>)
|
|
110
108
|
}
|
|
@@ -135,7 +133,7 @@ export const ReportOutput = (props: Props) => {
|
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
const getResults = () => {
|
|
138
|
-
if (!props.report) return (<DisplayBox ref={contentRef} id="reportsBox" headerIcon="summarize" headerText="
|
|
136
|
+
if (!props.report) return (<DisplayBox ref={contentRef} id="reportsBox" headerIcon="summarize" headerText={Locale.label("reporting.runReport")} editContent={getEditContent()}><p>{Locale.label("reporting.useFilter")}</p></DisplayBox>);
|
|
139
137
|
|
|
140
138
|
else if (!reportResult) return <Loading />
|
|
141
139
|
else {
|
|
@@ -3,6 +3,7 @@ import { LoginUserChurchInterface, UserContextInterface, ArrayHelper } from "@ch
|
|
|
3
3
|
import { ApiHelper } from "../../helpers/ApiHelper";
|
|
4
4
|
import { UserHelper } from "../../helpers/UserHelper";
|
|
5
5
|
import { NavItem } from "./NavItem";
|
|
6
|
+
import { Locale } from "../../helpers";
|
|
6
7
|
|
|
7
8
|
export interface Props { userChurches: LoginUserChurchInterface[], currentUserChurch: LoginUserChurchInterface, context: UserContextInterface, onDelete?: () => void }
|
|
8
9
|
|
|
@@ -10,17 +11,18 @@ export const ChurchList: React.FC<Props> = props => {
|
|
|
10
11
|
const [userChurches, setUserChurches] = useState(UserHelper.userChurches.filter(uc => uc.apis.length > 0 && uc.person.id !== null));
|
|
11
12
|
|
|
12
13
|
const handleDelete = (uc: LoginUserChurchInterface) => {
|
|
13
|
-
|
|
14
|
+
const label = Locale.label("wrapper.sureRemoveChurch").replace("{}", uc.church.name.toUpperCase());
|
|
15
|
+
if (window.confirm(label)) {
|
|
14
16
|
ApiHelper.delete(`/userchurch/record/${props.context.user.id}/${uc.church.id}/${uc.person.id}`, "MembershipApi")
|
|
15
|
-
|
|
17
|
+
.then(() => {
|
|
16
18
|
// remove the same from userChurches
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
const idx = ArrayHelper.getIndex(UserHelper.userChurches, "church.id", uc.church.id);
|
|
20
|
+
if (idx > -1) UserHelper.userChurches.splice(idx, 1);
|
|
21
|
+
//@ts-ignore
|
|
22
|
+
UserHelper.userChurches.push({ apis: uc.apis, church: uc.church, groups: uc.groups, jwt: uc.jwt, person: { id: null, membershipStatus: null } });
|
|
23
|
+
setUserChurches(UserHelper.userChurches.filter(uc => uc.apis.length > 0 && uc.person.id !== null));
|
|
24
|
+
props?.onDelete();
|
|
25
|
+
})
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -30,14 +32,14 @@ export const ChurchList: React.FC<Props> = props => {
|
|
|
30
32
|
userChurches.forEach(uc => {
|
|
31
33
|
const userChurch = uc;
|
|
32
34
|
const churchName = uc.church.name;
|
|
33
|
-
result.push(<NavItem
|
|
35
|
+
result.push(<NavItem
|
|
34
36
|
key={userChurch.church.id}
|
|
35
37
|
selected={(uc.church.id === props.currentUserChurch.church.id) && true}
|
|
36
38
|
onClick={() => UserHelper.selectChurch(props.context, userChurch.church.id, null)}
|
|
37
39
|
label={churchName}
|
|
38
40
|
icon="church"
|
|
39
41
|
deleteIcon={uc.church.id !== props.currentUserChurch.church.id ? "delete" : null}
|
|
40
|
-
deleteLabel="
|
|
42
|
+
deleteLabel={Locale.label("wrapper.deleteChurch")}
|
|
41
43
|
deleteFunction={() => { handleDelete(uc); }}
|
|
42
44
|
/>);
|
|
43
45
|
});
|
|
@@ -36,13 +36,15 @@ export const NavItem: React.FC<Props> = (props) => {
|
|
|
36
36
|
<ListItemIcon sx={{ minWidth: "40px" }}>{getIcon()}</ListItemIcon>
|
|
37
37
|
</Tooltip>
|
|
38
38
|
<ListItemText primary={props.label} />
|
|
39
|
-
{props?.deleteIcon
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
{props?.deleteIcon
|
|
40
|
+
? (
|
|
41
|
+
<Tooltip title={props.deleteLabel || ""} arrow placement="left">
|
|
42
|
+
<IconButton onClick={props.deleteFunction ? (e) => { e.stopPropagation(); e.preventDefault(); props.deleteFunction() } : null} sx={{ color: "#f7a9a9" }} size="small">
|
|
43
|
+
<Icon sx={{ fontSize: 19 }}>delete</Icon>
|
|
44
|
+
</IconButton>
|
|
45
|
+
</Tooltip>
|
|
46
|
+
)
|
|
47
|
+
: ""}
|
|
46
48
|
</ListItemButton>)
|
|
47
49
|
|
|
48
50
|
if (props.router) return (<a href={props.url} target={props.target} onClick={(e) => { e.preventDefault(); props.onClick ? props.onClick() : props.router.push(props.url) }} className={(props.selected) ? "selected" : ""}>{getLinkContents()}</a>)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button, TextField, TableRow, TableCell, Table, TableBody } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { ApiHelper, PersonHelper } from "../../helpers";
|
|
3
|
+
import { ApiHelper, Locale, PersonHelper } from "../../helpers";
|
|
4
4
|
import { ConversationInterface, PersonInterface, PrivateMessageInterface, UserContextInterface } from "@churchapps/helpers";
|
|
5
5
|
import { AddNote } from "../notes/AddNote";
|
|
6
6
|
import { SmallButton } from "../SmallButton";
|
|
@@ -59,7 +59,7 @@ export const NewPrivateMessage: React.FC<Props> = (props) => {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
const createConversation = async () => {
|
|
62
|
-
const conv: ConversationInterface = { allowAnonymousPosts: false, contentType: "privateMessage", contentId: props.context.person.id, title: props.context.person.name.display + "
|
|
62
|
+
const conv: ConversationInterface = { allowAnonymousPosts: false, contentType: "privateMessage", contentId: props.context.person.id, title: props.context.person.name.display + " " + Locale.label("wrapper.privateMessage"), visibility: "hidden" }
|
|
63
63
|
const result: ConversationInterface[] = await ApiHelper.post("/conversations", [conv], "MessagingApi");
|
|
64
64
|
|
|
65
65
|
const pm: PrivateMessageInterface = {
|
|
@@ -76,12 +76,12 @@ export const NewPrivateMessage: React.FC<Props> = (props) => {
|
|
|
76
76
|
<span style={{ float: "right" }}>
|
|
77
77
|
<SmallButton icon="chevron_left" text="Back" onClick={props.onBack} />
|
|
78
78
|
</span>
|
|
79
|
-
<b>
|
|
80
|
-
<div>
|
|
79
|
+
<b>{Locale.label("wrapper.newPrivateMessage")}</b>
|
|
80
|
+
<div>{Locale.label("wrapper.searchForPerson")}</div>
|
|
81
81
|
|
|
82
82
|
<TextField fullWidth label="Name" id="searchText" data-cy="search-input" name="searchText" type="text" placeholder="Name" value={searchText} onChange={handleChange}
|
|
83
83
|
onKeyDown={(e) => {e.stopPropagation()}}
|
|
84
|
-
InputProps={{ endAdornment: <Button variant="contained" id="searchButton" data-cy="search-button" onClick={handleSubmit}>
|
|
84
|
+
InputProps={{ endAdornment: <Button variant="contained" id="searchButton" data-cy="search-button" onClick={handleSubmit}>{Locale.label("common.search")}</Button> }}
|
|
85
85
|
/>
|
|
86
86
|
<br />
|
|
87
87
|
<Table id="smallPeopleTable" size="small">
|
|
@@ -95,7 +95,7 @@ export const NewPrivateMessage: React.FC<Props> = (props) => {
|
|
|
95
95
|
<span style={{ float: "right" }}>
|
|
96
96
|
<SmallButton icon="chevron_left" text="Back" onClick={props.onBack} />
|
|
97
97
|
</span>
|
|
98
|
-
<b>
|
|
98
|
+
<b>{Locale.label("wrapper.newPrivateMessage")}</b>
|
|
99
99
|
<div>To: {selectedPerson.name.display}</div>
|
|
100
100
|
<AddNote context={props.context} conversationId={null} onUpdate={handleNoteAdded} createConversation={createConversation} />
|
|
101
101
|
</div>
|
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
import { Menu, Icon, Button, Box, Tabs, Tab } from "@mui/material";
|
|
3
3
|
import { UserContextInterface } from "@churchapps/helpers";
|
|
4
4
|
import { PrivateMessages } from "./PrivateMessages";
|
|
5
|
-
import { TabPanel } from "../TabPanel";
|
|
6
5
|
import { Notifications } from "./Notifications";
|
|
7
6
|
import { Badge } from "@mui/base";
|
|
8
7
|
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { SmallButton } from "../SmallButton";
|
|
3
3
|
import { PrivateMessageInterface, UserContextInterface } from "@churchapps/helpers";
|
|
4
4
|
import { Notes } from "../notes/Notes";
|
|
5
|
+
import { Locale } from "../../helpers";
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
context: UserContextInterface;
|
|
@@ -16,7 +17,7 @@ export const PrivateMessageDetails: React.FC<Props> = (props) => (
|
|
|
16
17
|
<span style={{ float: "right" }}>
|
|
17
18
|
<SmallButton icon="chevron_left" text="Back" onClick={props.onBack} />
|
|
18
19
|
</span>
|
|
19
|
-
|
|
20
|
+
{Locale.label("wrapper.chatWith")} {props.privateMessage.person.name.display}
|
|
20
21
|
</div>
|
|
21
22
|
<Notes maxHeight={"50vh"} context={props.context} conversationId={props.privateMessage.conversationId} noDisplayBox={true} refreshKey={props.refreshKey} />
|
|
22
23
|
</>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ApiHelper } from "../../helpers/ApiHelper";
|
|
3
3
|
import { UserHelper } from "../../helpers/UserHelper";
|
|
4
|
-
import { Avatar, Menu, Typography, Icon, Button, Box
|
|
4
|
+
import { Avatar, Menu, Typography, Icon, Button, Box } from "@mui/material";
|
|
5
5
|
import { NavItem, AppList } from ".";
|
|
6
6
|
import { LoginUserChurchInterface, UserContextInterface } from "@churchapps/helpers";
|
|
7
7
|
import { ChurchList } from "./ChurchList";
|
|
8
8
|
import { SupportModal } from "../SupportModal";
|
|
9
9
|
import { CommonEnvironmentHelper } from "../../helpers/CommonEnvironmentHelper";
|
|
10
10
|
import { TabPanel } from "../TabPanel";
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { Locale } from "../../helpers";
|
|
13
12
|
|
|
14
13
|
interface Props {
|
|
15
14
|
userName: string;
|
|
@@ -41,13 +40,13 @@ export const UserMenu: React.FC<Props> = (props) => {
|
|
|
41
40
|
const jwt = ApiHelper.getConfig("MembershipApi").jwt;
|
|
42
41
|
const churchId = UserHelper.currentUserChurch.church.id;
|
|
43
42
|
let result: JSX.Element[] = [];
|
|
44
|
-
if (props.appName === "CHUMS") result.push(<NavItem url={"/profile"} key="/profile" label="
|
|
45
|
-
else result.push(<NavItem url={`${CommonEnvironmentHelper.ChumsRoot}/login?jwt=${jwt}&churchId=${churchId}&returnUrl=/profile`} key="/profile" label="
|
|
46
|
-
result.push(<NavItem url="/logout" label="
|
|
47
|
-
result.push(<NavItem label="Support" key="
|
|
43
|
+
if (props.appName === "CHUMS") result.push(<NavItem url={"/profile"} key="/profile" label={Locale.label("wrapper.profile")} icon="person" router={props.router} />);
|
|
44
|
+
else result.push(<NavItem url={`${CommonEnvironmentHelper.ChumsRoot}/login?jwt=${jwt}&churchId=${churchId}&returnUrl=/profile`} key="/profile" label={Locale.label("wrapper.profile")} icon="person" external={true} router={props.router} />);
|
|
45
|
+
result.push(<NavItem url="/logout" label={Locale.label("wrapper.logout")} icon="logout" key="/logout" router={props.router} />);
|
|
46
|
+
result.push(<NavItem label="Support" key={Locale.label("wrapper.support")} icon="help" onClick={() => { setShowSupport(true) }} />);
|
|
48
47
|
result.push(<div style={{borderTop:"1px solid #CCC", paddingTop:2, paddingBottom:2}}></div>)
|
|
49
|
-
result.push(<NavItem label="Switch App" key="
|
|
50
|
-
if (props.userChurches.length > 1) result.push(<NavItem label="
|
|
48
|
+
result.push(<NavItem label="Switch App" key={Locale.label("wrapper.switchApp")} icon="apps" onClick={() => { setTabIndex(1); }} />);
|
|
49
|
+
if (props.userChurches.length > 1) result.push(<NavItem label={Locale.label("wrapper.switchChurch")} key="Switch Church" icon="church" onClick={() => { setTabIndex(2); }} />);
|
|
51
50
|
return result;
|
|
52
51
|
}
|
|
53
52
|
|