> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# أعلام الميزة

تُستخدم أعلام الميزات لإخفاء الميزات التجريبية. بالنسبة إلى Twenty، يتم ضبطها على مستوى مساحة العمل وليس على مستوى المستخدم.

## إضافة علم ميزة جديد

في ملف `FeatureFlagKey.ts` أضف علم الميزة:

```ts theme={null}
type FeatureFlagKey =
  | 'IS_FEATURENAME_ENABLED'
  | ...;
```

أيضًا أضفه إلى التعداد في `feature-flag.entity.ts`:

```ts theme={null}
enum FeatureFlagKeys {
    IsFeatureNameEnabled = 'IS_FEATURENAME_ENABLED',
    ...
}
```

لتطبيق علم ميزة على ميزة **الخلفية** استخدم:

```ts theme={null}
@Gate({
  featureFlag: 'IS_FEATURENAME_ENABLED',
})
```

لتطبيق علم ميزة على ميزة **الواجهة الأمامية** استخدم:

```ts theme={null}
const isFeatureNameEnabled = useIsFeatureEnabled('IS_FEATURENAME_ENABLED');
```

## تكوين أعلام الميزات للنشر

تغيير السجل المعني في جدول `core.featureFlag`:

| المُعرّف | المفتاح                  | معرف مساحة العمل | القيمة |
| -------- | ------------------------ | ---------------- | ------ |
| عشوائي   | `IS_FEATURENAME_ENABLED` | معرف مساحة العمل | `صحيح` |
