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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user