feat: show this month's birthdays and send a greeting SMS

Each owner sees their customers born this Jalali month and can text a custom greeting.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-13 19:55:11 +03:30
co-authored by Cursor
parent cf326d1ed9
commit 13ee70764b
9 changed files with 556 additions and 3 deletions
+15 -1
View File
@@ -22,7 +22,7 @@ import { CurrentUser } from '../auth/current-user.decorator';
import type { Actor } from '../common/record-scope';
import { OrgModuleGuard } from '../billing/org-module.guard';
import { RequireOrgModule } from '../billing/org-module.decorator';
import { BulkDeletePeopleDto, CreatePersonDto, ListQueryDto, UpdatePersonDto } from './dto';
import { BirthdaySmsDto, BulkDeletePeopleDto, CreatePersonDto, ListQueryDto, UpdatePersonDto } from './dto';
import { PeopleService } from './people.service';
import { ContactsExcelService } from './contacts-excel.service';
import { brand } from '@mento/shared';
@@ -105,6 +105,20 @@ export class PeopleController {
});
}
@Get('birthdays')
birthdays(@CurrentUser() user: Actor) {
return this.peopleService.birthdaysThisMonth(user);
}
@Post(':id/birthday-sms')
birthdaySms(
@CurrentUser() user: Actor,
@Param('id') id: string,
@Body() dto: BirthdaySmsDto,
) {
return this.peopleService.sendBirthdaySms(user, id, dto.text);
}
@Get(':id')
get(@CurrentUser() user: Actor, @Param('id') id: string) {
return this.peopleService.get(user, id);