feat: Move webhooks configuration from environment variable to UI

This commit is contained in:
Maksim Eltyshev
2025-07-04 22:04:11 +02:00
parent f0680831c2
commit b22dba0d11
128 changed files with 2077 additions and 206 deletions
+2
View File
@@ -8,6 +8,7 @@ import common from './common';
import core from './core';
import modals from './modals';
import positioning from './positioning';
import webhooks from './webhooks';
import users from './users';
import projects from './projects';
import projectManagers from './project-managers';
@@ -35,6 +36,7 @@ export default {
...core,
...modals,
...positioning,
...webhooks,
...users,
...projects,
...projectManagers,
+41
View File
@@ -0,0 +1,41 @@
/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
import { createSelector } from 'redux-orm';
import orm from '../orm';
import { isLocalId } from '../utils/local-id';
export const makeSelectWebhookById = () =>
createSelector(
orm,
(_, id) => id,
({ Webhook }, id) => {
const webhookModel = Webhook.withId(id);
if (!webhookModel) {
return webhookModel;
}
return {
...webhookModel.ref,
isPersisted: !isLocalId(webhookModel.id),
};
},
);
export const selectWebhookById = makeSelectWebhookById();
export const selectWebhookIds = createSelector(orm, ({ Webhook }) =>
Webhook.getAllQuerySet()
.toRefArray()
.map((webhook) => webhook.id),
);
export default {
makeSelectWebhookById,
selectWebhookById,
selectWebhookIds,
};