Deals Excel import/export aligned with Didar: browser-side import, new deal fields (code, probability, closedAt, creator, lostNote, referrer), Didar custom fields

This commit is contained in:
2026-10-06 16:36:04 +03:30
parent e08f1452ef
commit 2a2728e5ee
11 changed files with 1032 additions and 210 deletions
+6 -1
View File
@@ -20,7 +20,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 { CreateDealDto, MoveDealDto, UpdateDealDto } from './dto';
import { CreateDealDto, ImportDealRowsDto, MoveDealDto, UpdateDealDto } from './dto';
import { DealsService } from './deals.service';
import { DealsExcelService } from './deals-excel.service';
import { brand } from '@mento/shared';
@@ -83,6 +83,11 @@ export class DealsController {
});
}
@Post('import/rows')
importRows(@CurrentUser() user: Actor, @Body() dto: ImportDealRowsDto) {
return this.excelService.importRows(user, dto);
}
@Get(':id')
get(@CurrentUser() user: Actor, @Param('id') id: string) {
return this.dealsService.get(user.organizationId, id, user);