81 lines
2.7 KiB
TypeScript
81 lines
2.7 KiB
TypeScript
|
|
import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common';
|
||
|
|
import { ManageClientsService } from './manage-clients.service';
|
||
|
|
import { ApiTags } from '@nestjs/swagger';
|
||
|
|
|
||
|
|
import {
|
||
|
|
CreateClientContactsDTO, CreateClientDataDTO,
|
||
|
|
CreateClientLocationsDTO, GetPreparerByClientidContactsByClientidLocByClientidDTO,
|
||
|
|
GetPreparersDTO, UpdateClientContactsDTO, UpdateClientDTO, UpdateClientLocationsDTO
|
||
|
|
} from 'src/dto/property.dto';
|
||
|
|
|
||
|
|
@Controller('oracle')
|
||
|
|
export class ManageClientsController {
|
||
|
|
constructor(private readonly manageClientsService: ManageClientsService) { }
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Post('CreateNewClients')
|
||
|
|
async CreateClientData(@Body() body: CreateClientDataDTO) {
|
||
|
|
return this.manageClientsService.CreateClientData(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Put('UpdateClient')
|
||
|
|
async UpdateClient(@Body() body: UpdateClientDTO) {
|
||
|
|
return this.manageClientsService.UpdateClient(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Put('UpdateClientContacts')
|
||
|
|
UpdateClientContacts(@Body() body: UpdateClientContactsDTO) {
|
||
|
|
return this.manageClientsService.UpdateClientContacts(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Put('UpdateClientLocations')
|
||
|
|
UpdateClientLocations(@Body() body: UpdateClientLocationsDTO) {
|
||
|
|
return this.manageClientsService.UpdateClientLocations(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Post('CreateClientContacts')
|
||
|
|
CreateClientContact(@Body() body: CreateClientContactsDTO) {
|
||
|
|
return this.manageClientsService.CreateClientContact(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Post('CreateClientLocations')
|
||
|
|
CreateClientLocation(@Body() body: CreateClientLocationsDTO) {
|
||
|
|
return this.manageClientsService.CreateClientLocation(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Get('GetPreparers')
|
||
|
|
async GetPreparers(@Query() query: GetPreparersDTO) {
|
||
|
|
return await this.manageClientsService.GetPreparers(query);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Get('GetPreparerByClientid')
|
||
|
|
GetPreparerByClientid(
|
||
|
|
@Query() body: GetPreparerByClientidContactsByClientidLocByClientidDTO,
|
||
|
|
) {
|
||
|
|
return this.manageClientsService.GetPreparerByClientid(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Get('GetPreparerContactsByClientid')
|
||
|
|
GetPreparerContactsByClientid(
|
||
|
|
@Query() body: GetPreparerByClientidContactsByClientidLocByClientidDTO,
|
||
|
|
) {
|
||
|
|
return this.manageClientsService.GetPreparerContactsByClientid(body);
|
||
|
|
}
|
||
|
|
|
||
|
|
@ApiTags('Manage Clients - Oracle')
|
||
|
|
@Get('GetPreparerLocByClientid')
|
||
|
|
GetPreparerLocByClientid(
|
||
|
|
@Query() body: GetPreparerByClientidContactsByClientidLocByClientidDTO,
|
||
|
|
) {
|
||
|
|
return this.manageClientsService.GetPreparerLocByClientid(body);
|
||
|
|
}
|
||
|
|
}
|