fix idp on started

This commit is contained in:
lendry
2026-06-24 17:34:55 +03:00
parent e60d55f6bd
commit b6987f4aea
10 changed files with 556 additions and 225 deletions

View File

@@ -109,6 +109,14 @@ function parseBooleanValue(value: string) {
export const MESSAGING_SETTING_KEYS = SYSTEM_SETTING_CATALOG.filter((item) => item.group === 'messaging').map((item) => item.key);
export const EMAIL_SETTING_KEYS = SYSTEM_SETTING_CATALOG.filter((item) =>
item.key.startsWith('EMAIL_')
).map((item) => item.key);
export const SMS_SETTING_KEYS = SYSTEM_SETTING_CATALOG.filter((item) =>
item.key.startsWith('SMS_')
).map((item) => item.key);
export function sortSettingsByCatalog<T extends { key: string }>(settings: T[]) {
const order = new Map(SYSTEM_SETTING_CATALOG.map((item, index) => [item.key, index]));
return [...settings].sort((a, b) => (order.get(a.key) ?? 999) - (order.get(b.key) ?? 999));