Merged in feature/IO-3492-FCM-Queue-For-Notifications (pull request #2775)

feature/IO-3492-FCM-Queue-For-Notifications: Implement FCM queue and worker for notifications
This commit is contained in:
Dave Richer
2026-01-06 19:35:42 +00:00
9 changed files with 885 additions and 163 deletions

View File

@@ -132,7 +132,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
dataIndex: "scenarioLabel",
key: "scenario",
render: (_, record) => t(`notifications.scenarios.${record.key}`),
width: "90%"
width: "80%"
},
{
title: <ColumnHeaderCheckbox channel="app" form={form} onHeaderChange={() => setIsDirty(true)} />,
@@ -156,20 +156,23 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
</Form.Item>
)
}
// TODO: Disabled for now until FCM is implemented.
// {
// title: <ColumnHeaderCheckbox channel="fcm" form={form} disabled onHeaderChange={() => setIsDirty(true)} />,
// dataIndex: "fcm",
// key: "fcm",
// align: "center",
// render: (_, record) => (
// <Form.Item name={[record.key, "fcm"]} valuePropName="checked" noStyle>
// <Checkbox disabled />
// </Form.Item>
// )
// }
];
// Currently disabled for prod
if (!import.meta.env.PROD) {
columns.push({
title: <ColumnHeaderCheckbox channel="fcm" form={form} onHeaderChange={() => setIsDirty(true)} />,
dataIndex: "fcm",
key: "fcm",
align: "center",
render: (_, record) => (
<Form.Item name={[record.key, "fcm"]} valuePropName="checked" noStyle>
<Checkbox />
</Form.Item>
)
});
}
const dataSource = notificationScenarios.map((scenario) => ({ key: scenario }));
return (
@@ -186,13 +189,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
extra={
<Space>
<Typography.Text type="secondary">{t("notifications.labels.auto-add")}</Typography.Text>
<Switch
checked={autoAddEnabled}
onChange={handleAutoAddToggle}
loading={savingAutoAdd}
// checkedChildren={t("notifications.labels.auto-add-on")}
// unCheckedChildren={t("notifications.labels.auto-add-off")}
/>
<Switch checked={autoAddEnabled} onChange={handleAutoAddToggle} loading={savingAutoAdd} />
<Button type="default" onClick={handleReset} disabled={!isDirty && !isAutoAddDirty}>
{t("general.actions.clear")}
</Button>