@churchapps/apphelper 0.2.33 → 0.2.34
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/SupportModal.d.ts.map +1 -1
- package/dist/components/SupportModal.js +6 -24
- package/dist/components/SupportModal.js.map +1 -1
- package/dist/components/wrapper/ChurchList.d.ts.map +1 -1
- package/dist/components/wrapper/ChurchList.js +21 -15
- package/dist/components/wrapper/ChurchList.js.map +1 -1
- package/dist/public/locales/en.json +4 -6
- package/package.json +1 -1
- package/public/locales/en.json +4 -6
- package/src/components/SupportModal.tsx +2 -4
- package/src/components/wrapper/ChurchList.tsx +9 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportModal.d.ts","sourceRoot":"","sources":["../../src/components/SupportModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"SupportModal.d.ts","sourceRoot":"","sources":["../../src/components/SupportModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAexC,CAAC"}
|
|
@@ -13,42 +13,24 @@ const SupportModal = ({ appName = "", onClose }) => {
|
|
|
13
13
|
react_1.default.createElement(material_1.Dialog, { open: true, onClose: onClose },
|
|
14
14
|
react_1.default.createElement(material_1.DialogTitle, null, "Get Support"),
|
|
15
15
|
react_1.default.createElement(material_1.DialogContent, null,
|
|
16
|
-
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", sx: { flexWrap: "wrap" }
|
|
17
|
-
react_1.default.createElement("b", null,
|
|
18
|
-
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", mr: "5px" },
|
|
19
|
-
react_1.default.createElement(material_1.Icon, { sx: { marginRight: "5px" } }, "mail"),
|
|
20
|
-
" ",
|
|
21
|
-
helpers_1.Locale.label("support.email"),
|
|
22
|
-
":")),
|
|
23
|
-
" ",
|
|
24
|
-
react_1.default.createElement("a", { href: "mailto:support@livecs.org" + subject }, "support@churchapps.org")),
|
|
25
|
-
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", sx: { flexWrap: "wrap" }, mb: 2 },
|
|
16
|
+
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", sx: { flexWrap: "wrap" } },
|
|
26
17
|
react_1.default.createElement("b", null,
|
|
27
18
|
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", mr: "5px" },
|
|
28
|
-
react_1.default.createElement(material_1.Icon, { sx: { marginRight: "5px" } }, "
|
|
19
|
+
react_1.default.createElement(material_1.Icon, { sx: { marginRight: "5px" } }, "info"),
|
|
29
20
|
" ",
|
|
30
|
-
helpers_1.Locale.label("support.
|
|
21
|
+
helpers_1.Locale.label("support.documentation"),
|
|
31
22
|
":")),
|
|
32
23
|
" ",
|
|
33
|
-
react_1.default.createElement("a", { href: "
|
|
24
|
+
react_1.default.createElement("a", { href: "https://support.churchapps.org", target: "_new" }, "https://support.churchapps.org")),
|
|
34
25
|
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", sx: { flexWrap: "wrap" }, mb: 2 },
|
|
35
26
|
react_1.default.createElement("b", null,
|
|
36
27
|
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", mr: "5px" },
|
|
37
28
|
react_1.default.createElement(material_1.Icon, { sx: { marginRight: "5px" } }, "forum"),
|
|
38
29
|
" ",
|
|
39
|
-
helpers_1.Locale.label("support.
|
|
40
|
-
":")),
|
|
41
|
-
" ",
|
|
42
|
-
react_1.default.createElement("a", { href: "https://m.me/livecsolutions", target: "_new" }, "https://m.me/livecsolutions")),
|
|
43
|
-
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", sx: { flexWrap: "wrap" } },
|
|
44
|
-
react_1.default.createElement("b", null,
|
|
45
|
-
react_1.default.createElement(material_1.Stack, { direction: "row", alignItems: "center", mr: "5px" },
|
|
46
|
-
react_1.default.createElement(material_1.Icon, { sx: { marginRight: "5px" } }, "info"),
|
|
47
|
-
" ",
|
|
48
|
-
helpers_1.Locale.label("support.knowledgeBase"),
|
|
30
|
+
helpers_1.Locale.label("support.discussions"),
|
|
49
31
|
":")),
|
|
50
32
|
" ",
|
|
51
|
-
react_1.default.createElement("a", { href: "https://
|
|
33
|
+
react_1.default.createElement("a", { href: "https://github.com/orgs/ChurchApps/discussions", target: "_new" }, "https://github.com/orgs/ChurchApps/discussions"))),
|
|
52
34
|
react_1.default.createElement(material_1.DialogActions, { sx: { paddingX: "16px", paddingBottom: "12px" } },
|
|
53
35
|
react_1.default.createElement(material_1.Button, { variant: "outlined", onClick: onClose }, "Close")))));
|
|
54
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportModal.js","sourceRoot":"","sources":["../../src/components/SupportModal.tsx"],"names":[],"mappings":";;;;;;AAAA,4CAAuG;AACvG,kDAA0B;AAC1B,wCAAoC;AAO7B,MAAM,YAAY,GAAoB,CAAC,EAAE,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IACzE,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,YAAY,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;IAE5D,OAAO,CAAC;QACN,8BAAC,iBAAM,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;YAClC,8BAAC,sBAAW,sBAA0B;YACtC,8BAAC,wBAAa;gBACZ,8BAAC,gBAAK,IAAC,SAAS,EA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,eAAI,IAAC,EAAE,EAAE,EAAC,WAAW,EAAE,KAAK,EAAC,YAAc;;4BAAE,gBAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC;gCAAU,CAAI;;oBAAC,qCAAG,IAAI,EAAC,gDAAgD,EAAC,MAAM,EAAC,MAAM,qDAAmD,CAAQ,CACpV;YAChB,8BAAC,wBAAa,IAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE;gBAC5D,8BAAC,iBAAM,IAAC,OAAO,EAAC,UAAU,EAAC,OAAO,EAAE,OAAO,YAAgB,CAC7C,CACT,CACR,CAAC,CAAC;AACP,CAAC,CAAC;AAfW,QAAA,YAAY,gBAevB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChurchList.d.ts","sourceRoot":"","sources":["../../../src/components/wrapper/ChurchList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAe,MAAM,qBAAqB,CAAC;AAMlG,MAAM,WAAW,KAAK;IAAG,YAAY,EAAE,wBAAwB,EAAE,CAAC;IAAC,iBAAiB,EAAE,wBAAwB,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE;AAEtK,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ChurchList.d.ts","sourceRoot":"","sources":["../../../src/components/wrapper/ChurchList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAe,MAAM,qBAAqB,CAAC;AAMlG,MAAM,WAAW,KAAK;IAAG,YAAY,EAAE,wBAAwB,EAAE,CAAC;IAAC,iBAAiB,EAAE,wBAAwB,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE;AAEtK,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmCtC,CAAC"}
|
|
@@ -22,6 +22,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
25
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
35
|
exports.ChurchList = void 0;
|
|
27
36
|
const react_1 = __importStar(require("react"));
|
|
@@ -31,23 +40,20 @@ const UserHelper_1 = require("../../helpers/UserHelper");
|
|
|
31
40
|
const NavItem_1 = require("./NavItem");
|
|
32
41
|
const helpers_2 = require("../../helpers");
|
|
33
42
|
const ChurchList = props => {
|
|
34
|
-
const [userChurches, setUserChurches] = (0, react_1.useState)(UserHelper_1.UserHelper.userChurches.filter(uc => uc.apis.length > 0
|
|
35
|
-
const handleDelete = (uc) => {
|
|
36
|
-
|
|
43
|
+
const [userChurches, setUserChurches] = (0, react_1.useState)(UserHelper_1.UserHelper.userChurches.filter(uc => uc.apis.length > 0));
|
|
44
|
+
const handleDelete = (uc) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
+
var _a;
|
|
46
|
+
const label = helpers_2.Locale.label("wrapper.sureRemoveChurch").replace("{}", (_a = uc.church.name) === null || _a === void 0 ? void 0 : _a.toUpperCase());
|
|
37
47
|
if (window.confirm(label)) {
|
|
38
|
-
ApiHelper_1.ApiHelper.delete(`/userchurch/record/${props.context.user.id}/${uc.church.id}/${uc.person.id}`, "MembershipApi")
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
UserHelper_1.UserHelper.userChurches.push({ apis: uc.apis, church: uc.church, groups: uc.groups, jwt: uc.jwt, person: { id: null, membershipStatus: null } });
|
|
46
|
-
setUserChurches(UserHelper_1.UserHelper.userChurches.filter(uc => uc.apis.length > 0 && uc.person.id !== null));
|
|
47
|
-
props === null || props === void 0 ? void 0 : props.onDelete();
|
|
48
|
-
});
|
|
48
|
+
yield ApiHelper_1.ApiHelper.delete(`/userchurch/record/${props.context.user.id}/${uc.church.id}/${uc.person.id}`, "MembershipApi");
|
|
49
|
+
yield ApiHelper_1.ApiHelper.delete(`/rolemembers/self/${uc.church.id}/${props.context.user.id}`, "MembershipApi");
|
|
50
|
+
// remove the same from userChurches
|
|
51
|
+
const idx = helpers_1.ArrayHelper.getIndex(UserHelper_1.UserHelper.userChurches, "church.id", uc.church.id);
|
|
52
|
+
if (idx > -1)
|
|
53
|
+
UserHelper_1.UserHelper.userChurches.splice(idx, 1);
|
|
54
|
+
props === null || props === void 0 ? void 0 : props.onDelete();
|
|
49
55
|
}
|
|
50
|
-
};
|
|
56
|
+
});
|
|
51
57
|
if (userChurches.length < 2)
|
|
52
58
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
53
59
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChurchList.js","sourceRoot":"","sources":["../../../src/components/wrapper/ChurchList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChurchList.js","sourceRoot":"","sources":["../../../src/components/wrapper/ChurchList.tsx"],"names":[],"mappings":";;;;;;;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
|
"support": {
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"messenger": "Messenger",
|
|
256
|
-
"phone": "Phone"
|
|
253
|
+
"documentation": "Documentation",
|
|
254
|
+
"discussions": "Support Forum"
|
|
257
255
|
},
|
|
258
256
|
"wrapper": {
|
|
259
257
|
"chatWith": "Chat with",
|
|
260
|
-
"deleteChurch": "Delete
|
|
258
|
+
"deleteChurch": "Delete",
|
|
261
259
|
"logout": "Logout",
|
|
262
260
|
"newPrivateMessage": "New Private Message",
|
|
263
261
|
"privateMessage": "Private Message",
|
|
264
262
|
"profile": "Profile",
|
|
265
263
|
"searchForPerson": "Search for a person",
|
|
266
264
|
"support": "Support",
|
|
267
|
-
"sureRemoveChurch": "Are you sure you wish to delete
|
|
265
|
+
"sureRemoveChurch": "Are you sure you wish to delete this church? You no longer will be a member of {}.",
|
|
268
266
|
"switchApp": "Switch App",
|
|
269
267
|
"switchChurch": "Switch Church"
|
|
270
268
|
}
|
package/package.json
CHANGED
package/public/locales/en.json
CHANGED
|
@@ -250,21 +250,19 @@
|
|
|
250
250
|
"providedBy": "Stock photos provided by"
|
|
251
251
|
},
|
|
252
252
|
"support": {
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"messenger": "Messenger",
|
|
256
|
-
"phone": "Phone"
|
|
253
|
+
"documentation": "Documentation",
|
|
254
|
+
"discussions": "Support Forum"
|
|
257
255
|
},
|
|
258
256
|
"wrapper": {
|
|
259
257
|
"chatWith": "Chat with",
|
|
260
|
-
"deleteChurch": "Delete
|
|
258
|
+
"deleteChurch": "Delete",
|
|
261
259
|
"logout": "Logout",
|
|
262
260
|
"newPrivateMessage": "New Private Message",
|
|
263
261
|
"privateMessage": "Private Message",
|
|
264
262
|
"profile": "Profile",
|
|
265
263
|
"searchForPerson": "Search for a person",
|
|
266
264
|
"support": "Support",
|
|
267
|
-
"sureRemoveChurch": "Are you sure you wish to delete
|
|
265
|
+
"sureRemoveChurch": "Are you sure you wish to delete this church? You no longer will be a member of {}.",
|
|
268
266
|
"switchApp": "Switch App",
|
|
269
267
|
"switchChurch": "Switch Church"
|
|
270
268
|
}
|
|
@@ -14,10 +14,8 @@ export const SupportModal: React.FC<Props> = ({ appName = "", onClose }) => {
|
|
|
14
14
|
<Dialog open={true} onClose={onClose}>
|
|
15
15
|
<DialogTitle>Get Support</DialogTitle>
|
|
16
16
|
<DialogContent>
|
|
17
|
-
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}}
|
|
18
|
-
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>
|
|
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>
|
|
17
|
+
<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.documentation")}:</Stack></b> <a href="https://support.churchapps.org" target="_new">https://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"}}>forum</Icon> {Locale.label("support.discussions")}:</Stack></b> <a href="https://github.com/orgs/ChurchApps/discussions" target="_new">https://github.com/orgs/ChurchApps/discussions</a></Stack>
|
|
21
19
|
</DialogContent>
|
|
22
20
|
<DialogActions sx={{ paddingX: "16px", paddingBottom: "12px" }}>
|
|
23
21
|
<Button variant="outlined" onClick={onClose}>Close</Button>
|
|
@@ -8,21 +8,17 @@ import { Locale } from "../../helpers";
|
|
|
8
8
|
export interface Props { userChurches: LoginUserChurchInterface[], currentUserChurch: LoginUserChurchInterface, context: UserContextInterface, onDelete?: () => void }
|
|
9
9
|
|
|
10
10
|
export const ChurchList: React.FC<Props> = props => {
|
|
11
|
-
const [userChurches, setUserChurches] = useState(UserHelper.userChurches.filter(uc => uc.apis.length > 0
|
|
11
|
+
const [userChurches, setUserChurches] = useState(UserHelper.userChurches.filter(uc => uc.apis.length > 0));
|
|
12
12
|
|
|
13
|
-
const handleDelete = (uc: LoginUserChurchInterface) => {
|
|
14
|
-
const label = Locale.label("wrapper.sureRemoveChurch").replace("{}", uc.church.name
|
|
13
|
+
const handleDelete = async (uc: LoginUserChurchInterface) => {
|
|
14
|
+
const label = Locale.label("wrapper.sureRemoveChurch").replace("{}", uc.church.name?.toUpperCase());
|
|
15
15
|
if (window.confirm(label)) {
|
|
16
|
-
ApiHelper.delete(`/userchurch/record/${props.context.user.id}/${uc.church.id}/${uc.person.id}`, "MembershipApi")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
})
|
|
16
|
+
await ApiHelper.delete(`/userchurch/record/${props.context.user.id}/${uc.church.id}/${uc.person.id}`, "MembershipApi");
|
|
17
|
+
await ApiHelper.delete(`/rolemembers/self/${uc.church.id}/${props.context.user.id}`, "MembershipApi");
|
|
18
|
+
// remove the same from userChurches
|
|
19
|
+
const idx = ArrayHelper.getIndex(UserHelper.userChurches, "church.id", uc.church.id);
|
|
20
|
+
if (idx > -1) UserHelper.userChurches.splice(idx, 1);
|
|
21
|
+
props?.onDelete();
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
24
|
|