getRoleProfiles method

Future<List<RoleProfileModel>> getRoleProfiles(
  1. String orgId
)

Implementation

Future<List<RoleProfileModel>> getRoleProfiles(String orgId) async {
  final response = await _client
      .from('role_profiles')
      .select('*, role_skill_expectations(*, skills(name))')
      .eq('org_id', orgId)
      .order('name');
  return (response as List<dynamic>)
      .map((r) => RoleProfileModel.fromJson(r as Map<String, dynamic>))
      .toList();
}