Untitled
unknown
plain_text
12 days ago
1.1 kB
1
Indexable
Never
class CompensationMigrationFeatureFlagService: def __init__(self, org_id: int): self.org_id = org_id @cached_property def compensation_migration_feature_flag(self) -> str: return get_feature_variation_by_organization( feature_key=FF_COMPENSATION_MIGRATION_TO_PAYROLL, org_id=self.org_id, default=CompensationMigrationFeatureFlagType.SHOW_COMPENSATION_HIDE_PAYROLL.value, ) @cached_property def show_payroll_compensation(self) -> bool: return self.compensation_migration_feature_flag in ( CompensationMigrationFeatureFlagType.HIDE_COMPENSATION_SHOW_PAYROLL.value, CompensationMigrationFeatureFlagType.SHOW_COMPENSATION_AND_PAYROLL.value, ) @cached_property def show_compensation(self) -> bool: return self.compensation_migration_feature_flag in ( CompensationMigrationFeatureFlagType.SHOW_COMPENSATION_AND_PAYROLL.value, CompensationMigrationFeatureFlagType.SHOW_COMPENSATION_HIDE_PAYROLL.value, )
Leave a Comment