PageSourceSearch

https://mensenlinq.nl/build/assets/Management-BrzBAU0Y.js

js mensenlinq.nl collected 2026-10-02 10:11:38 UTC 8,587 bytes, 190 lines download raw bytes

1import { a as require_react, d as __toESM, n as require_jsx_runtime } from "./axios-D_Zw0bxE.js";
2import { i as useForm, o as router } from "./dist-DbGcmBzE.js";
3import { a as init_moment, i as hooks, s as Button } from "./entry-app.js";
4import { t as relativeRoute } from "./relativeRoute-COMakHFU.js";
5import { t as Page_default } from "./Page-7eWs8iOQ.js";
6import { t as InputError } from "./InputError-D_63gI6d.js";
7import { t as Header_default } from "./Header-CSuq8Lzr.js";
8import { t as Common_module_default } from "./Common.module-DuY6orBZ.js";
9import { t as InputLabel_default } from "./InputLabel-DSBqBDhr.js";
10import { t as TextInput_default } from "./TextInput-CwWmrKtY.js";
11import "./TextInput-BshiHmU-.js";
12var Management_module_default = {
13	section: "_section_1evq5_1",
14	form: "_form_1evq5_19",
15	actions: "_actions_1evq5_24",
16	table: "_table_1evq5_28"
17};
18//#endregion
19//#region resources/js/Pages/Account/Management.tsx
20init_moment();
21var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
22var import_jsx_runtime = require_jsx_runtime();
23function Settings(props) {
24	const { person, invites, managers, auth, organisation } = props;
25	const [showSuccess, setShowSuccess] = (0, import_react.useState)(false);
26	const { data, setData, post, processing, errors, reset } = useForm({
27		name: "",
28		email: ""
29	});
30	const handleSubmit = (e) => {
31		e.preventDefault();
32		post(relativeRoute("account.person.management.invite", { person: person.id }), { preserveScroll: true });
33		setShowSuccess(true);
34		reset();
35	};
36	const handleDeleteManager = (userId) => {
37		const route = relativeRoute("account.person.management.manager", {
38			person: person.id,
39			manager: userId
40		});
41		router.delete(route, { preserveScroll: true });
42	};
43	const handleDeleteInvite = (inviteId) => {
44		const route = relativeRoute("account.person.management.deleteInvite", {
45			person: person.id,
46			invite: inviteId
47		});
48		router.delete(route, { preserveScroll: true });
49	};
50	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Page_default, {
51		title: "Beheer",
52		children: [
53			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Header_default, { ...props }),
54			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", {
55				className: "mx-5",
56				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
57					className: `container ${Management_module_default.section}`,
58					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Beheerders" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
59						className: Management_module_default.content,
60						children: [managers.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
61							className: Management_module_default.table,
62							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
63								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Naam" }),
64								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Toegevoegd" }),
65								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Acties" })
66							] }) }
66), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: managers.map(({ id, name, email, created_at }, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
67								/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", { children: [
68									name,
69									" <",
70									email,
71									">"
72								] }),
73								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: hooks(created_at).format("LLL") }),
74								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
75									className: "align-center",
76									children: auth.user.id !== id && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
77										href: "#",
78										onClick: (e) => {
79											e.preventDefault();
80											handleDeleteManager(id);
81										},
82										children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { className: "fa-regular fa-trash-can" })
83									})
84								})
85							] }, index)) })]
86						}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Deze rouwpagina heeft geen individuele beheerders." }
86), organisation && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: ["Deze rouwpagina wordt beheerd door organisatie ", organisation.name] })]
87					})]
88				})
89			}),
90			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", {
91				className: "mx-5",
92				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
93					className: `container ${Management_module_default.section}`,
94					children: [
95						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Nieuwe beheerder uitnodigen" }),
96						showSuccess && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
97							className: "notification-success",
98							children: "Beheerder is uitgenodigd."
99						}),
100						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", {
101							className: Management_module_default.form,
102							onSubmit: handleSubmit,
103							children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("fieldset", {
104								disabled: processing,
105								children: [
106									/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
107										/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputLabel_default, {
108											htmlFor: "name",
109											value: "Naam"
110										}),
111										/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextInput_default, {
112											id: "name",
113											name: "name",
114											autoComplete: "name",
115											value: data.name,
116											onChange: (e) => setData("name", e.target.value),
117											fullWidth: true
118										}),
119										/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputError, {
120											message: errors.name,
121											className: "mt-2"
122										})
123									] }),
124									/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
125										/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputLabel_default, {
126											htmlFor: "email",
127											value: "Email"
128										}),
129										/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextInput_default, {
130											id: "email",
131											name: "email",
132											autoComplete: "email",
133											value: data.email,
134											onChange: (e) => setData("email", e.target.value),
135											fullWidth: true
136										}),
137										/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputError, {
138											message: errors.email,
139											className: "mt-2"
140										})
141									] }),
142									/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
143										className: Management_module_default.actions,
144										children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
145											type: "submit",
146											children: "Uitnodigen"
147										})
148									})
149								]
150							})
151						}),
152						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {}),
153						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "Openstaande uitnodiging" }),
154						invites.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
155							className: Common_module_default.table,
156							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
157								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Naam" }),
158								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Toegevoegd" }),
159								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Acties" })
160							] }) }
160), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: invites.map(({ id, name, email, created_at }, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
161								/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", { children: [
162									name,
163									" <",
164									email,
165									">"
166								] }),
167								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: hooks(created_at).format("LLL") }),
168								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
169									className: "align-center",
170									children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
171										href: "#",
172										onClick: (e) => {
173											e.preventDefault();
174											handleDeleteInvite(id);
175										},
176										children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { className: "fa-regular fa-trash-can" })
177									})
178								})
179							] }, index)) })]
180						}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Er zijn geen uitstaande uitnodigingen." })
181					]
182				})
183			})
184		]
185	});
186}
187//#endregion
188export { Settings as default };
189
190//# sourceMappingURL=Management-BrzBAU0Y.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.