Adopt shared WebUI layout primitives
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
type CampaignCalendarCatalog,
|
||||
type CampaignPostboxCatalog
|
||||
} from "../../api/campaigns";
|
||||
import { Button } from "@govoplan/core-webui";
|
||||
import { FormGrid, ContentGrid, Button } from "@govoplan/core-webui";
|
||||
import { Card } from "@govoplan/core-webui";
|
||||
import { FormField } from "@govoplan/core-webui";
|
||||
import { DismissibleAlert } from "@govoplan/core-webui";
|
||||
@@ -211,7 +211,7 @@ export default function GlobalSettingsPage({ settings, auth, campaignId, view =
|
||||
|
||||
}
|
||||
|
||||
<div className="dashboard-grid below-grid">
|
||||
<ContentGrid columns={2} collapseAt="workspace" className="below-grid">
|
||||
<Card title="i18n:govoplan-campaign.validation_policy.57dcc756" collapsible>
|
||||
<PolicyTable className="campaign-policy-table" rowClassName="campaign-policy-row" headerClassName="campaign-policy-row-header" fieldLabel="i18n:govoplan-campaign.policy.bb9cf141" settingLabel="i18n:govoplan-campaign.setting.fb449f71" effectiveLabel="i18n:govoplan-campaign.effective_behavior.3daa11c2" showEffectiveColumn>
|
||||
<PolicyRow
|
||||
@@ -321,20 +321,20 @@ export default function GlobalSettingsPage({ settings, auth, campaignId, view =
|
||||
|
||||
</PolicyTable>
|
||||
</Card>
|
||||
</div>
|
||||
</ContentGrid>
|
||||
</> :
|
||||
|
||||
<>
|
||||
{data.campaign && <CampaignAccessCard settings={settings} auth={auth} campaign={data.campaign} onChanged={reload} onError={setError} />}
|
||||
|
||||
<div className="dashboard-grid below-grid">
|
||||
<ContentGrid columns={2} collapseAt="workspace" className="below-grid">
|
||||
<Card title="i18n:govoplan-campaign.delivery_defaults.33cc3b97" collapsible>
|
||||
<div className="form-grid compact responsive-form-grid">
|
||||
<FormGrid columns={2} collapseAt="wide" className="">
|
||||
<FormField label="i18n:govoplan-campaign.messages_per_minute.bea49348"><input type="number" min={1} value={getNumber(rateLimit, "messages_per_minute", 5)} disabled={locked} onChange={(event) => patch(["delivery", "rate_limit", "messages_per_minute"], Number(event.target.value || 1))} /></FormField>
|
||||
<FormField label="i18n:govoplan-campaign.concurrency.2ec390bf"><input type="number" min={1} value={getNumber(rateLimit, "concurrency", 1)} disabled={locked} onChange={(event) => patch(["delivery", "rate_limit", "concurrency"], Number(event.target.value || 1))} /></FormField>
|
||||
<FormField label="i18n:govoplan-campaign.max_attempts.f684fef4"><input type="number" min={1} value={getNumber(retry, "max_attempts", 3)} disabled={locked} onChange={(event) => patch(["delivery", "retry", "max_attempts"], Number(event.target.value || 1))} /></FormField>
|
||||
<ToggleSwitch label="i18n:govoplan-campaign.status_tracking.15f61f88" checked={getBool(statusTracking, "enabled", true)} disabled={locked} onChange={(checked) => patch(["status_tracking", "enabled"], checked)} />
|
||||
</div>
|
||||
</FormGrid>
|
||||
{postboxModuleInstalled &&
|
||||
<div className="campaign-postbox-delivery-settings">
|
||||
<FormField label="Delivery channels">
|
||||
@@ -375,7 +375,7 @@ export default function GlobalSettingsPage({ settings, auth, campaignId, view =
|
||||
</Card>
|
||||
|
||||
<Card title="Calendar invitations" collapsible>
|
||||
<div className="form-grid compact responsive-form-grid">
|
||||
<FormGrid columns={2} collapseAt="wide" className="">
|
||||
<ToggleSwitch
|
||||
label="Send individualized invitations"
|
||||
checked={getBool(calendarInvitation, "enabled")}
|
||||
@@ -454,7 +454,7 @@ export default function GlobalSettingsPage({ settings, auth, campaignId, view =
|
||||
onChange={(event) => patch(["delivery", "calendar_invitation", "description_template"], event.target.value)}
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
</FormGrid>
|
||||
{!mailModuleInstalled &&
|
||||
<DismissibleAlert tone="warning" dismissible={false}>
|
||||
Mail must be active to deliver iCalendar invitations.
|
||||
@@ -483,7 +483,7 @@ export default function GlobalSettingsPage({ settings, auth, campaignId, view =
|
||||
</div>
|
||||
<p className="muted small-note">i18n:govoplan-campaign.these_opt_ins_are_stored_in_the_draft_editor_met.dc6ffbfd</p>
|
||||
</Card>
|
||||
</div>
|
||||
</ContentGrid>
|
||||
</>
|
||||
}
|
||||
</LoadingFrame>
|
||||
|
||||
Reference in New Issue
Block a user