57 lines
1.8 KiB
JavaScript
57 lines
1.8 KiB
JavaScript
(function () {
|
|
const OrgPortal = (window.OrgPortal = window.OrgPortal || {});
|
|
const { h } = OrgPortal.runtime;
|
|
const permissions = OrgPortal.permissions;
|
|
const actions = OrgPortal.actions;
|
|
|
|
OrgPortal.componentFns = OrgPortal.componentFns || {};
|
|
|
|
OrgPortal.componentFns.DangerCard = function DangerCard() {
|
|
if (!permissions.canDisbandOrg()) {
|
|
return null;
|
|
}
|
|
|
|
return h(
|
|
"section",
|
|
{ className: "card org-panel org-span-12 org-danger-panel" },
|
|
h(
|
|
"div",
|
|
{ className: "org-panel-head" },
|
|
h(
|
|
"div",
|
|
null,
|
|
h(
|
|
"h2",
|
|
{ className: "org-panel-title" },
|
|
"Organization Controls",
|
|
),
|
|
h(
|
|
"p",
|
|
{ className: "org-panel-subtitle" },
|
|
"Leader-only actions for membership and permanent organization removal.",
|
|
),
|
|
),
|
|
),
|
|
h(
|
|
"div",
|
|
{ className: "org-danger-copy" },
|
|
h("strong", null, "Disband organization"),
|
|
h(
|
|
"p",
|
|
null,
|
|
"This removes the organization and revokes access to the portal for all members.",
|
|
),
|
|
),
|
|
h(
|
|
"button",
|
|
{
|
|
type: "button",
|
|
className: "org-danger-btn",
|
|
onClick: () => actions.openModal("disband"),
|
|
},
|
|
"Disband Organization",
|
|
),
|
|
);
|
|
};
|
|
})();
|