add benefit eligibility setting to HR members
This commit is contained in:
@@ -120,6 +120,22 @@ export class AccountBalanceService {
|
||||
};
|
||||
}
|
||||
|
||||
async upsertHealthBenefitsBySchedule(
|
||||
benefitDistributionScheduleId: string,
|
||||
): Promise<void> {
|
||||
console.info('Updating health benefits...');
|
||||
const { error } = await this.supabase
|
||||
.schema('medreport')
|
||||
.rpc('upsert_health_benefits', {
|
||||
p_benefit_distribution_schedule_id: benefitDistributionScheduleId,
|
||||
});
|
||||
if (error) {
|
||||
console.error('Error Updating health benefits.', error);
|
||||
throw new Error('Failed Updating health benefits.');
|
||||
}
|
||||
console.info('Updating health benefits successfully');
|
||||
}
|
||||
|
||||
async processPeriodicBenefitDistributions(): Promise<void> {
|
||||
console.info('Processing periodic benefit distributions...');
|
||||
const { error } = await this.supabase
|
||||
|
||||
Reference in New Issue
Block a user