Adds Event system and automatic messages
This commit is contained in:
parent
0e10ea3cab
commit
2f826fbf36
20 changed files with 428 additions and 18 deletions
|
|
@ -8,6 +8,7 @@ import {ArrayUtils} from "../Utilities/ArrayUtils";
|
|||
export enum TransformerType {
|
||||
Locale,
|
||||
Channel,
|
||||
PermissionBoolean,
|
||||
}
|
||||
|
||||
type GroupConfigurationTransformer = {
|
||||
|
|
@ -16,7 +17,7 @@ type GroupConfigurationTransformer = {
|
|||
}
|
||||
|
||||
export type GroupConfigurationResult =
|
||||
ChannelId | Intl.Locale
|
||||
ChannelId | Intl.Locale | boolean
|
||||
|
||||
export class GroupConfigurationTransformers {
|
||||
static TRANSFORMERS: GroupConfigurationTransformer[] = [
|
||||
|
|
@ -31,6 +32,10 @@ export class GroupConfigurationTransformers {
|
|||
{
|
||||
path: ['locale'],
|
||||
type: TransformerType.Locale,
|
||||
},
|
||||
{
|
||||
path: ['permissions', 'allowMemberManagingPlaydates'],
|
||||
type: TransformerType.PermissionBoolean
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -45,6 +50,8 @@ export class GroupConfigurationTransformers {
|
|||
return new Intl.Locale(configValue.value)
|
||||
case TransformerType.Channel:
|
||||
return <ChannelId>configValue.value;
|
||||
case TransformerType.PermissionBoolean:
|
||||
return configValue.value === '1';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue