76 lines
2.6 KiB
TypeScript
76 lines
2.6 KiB
TypeScript
import { Body, Controller, Get, Param, Post, Put, Query } from '@nestjs/common';
|
|
import { ManageClientsService } from './manage-clients.service';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
|
|
import {
|
|
CreateClientContactsDTO, CreateClientDataDTO,
|
|
CreateClientLocationsDTO,
|
|
GetClientDTO,
|
|
GetPreparersParamDTO, GetPreparersQueryDTO, 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/:P_SPID/:P_STATUS')
|
|
async GetPreparers(@Param() param: GetPreparersParamDTO, @Query() query: GetPreparersQueryDTO) {
|
|
return await this.manageClientsService.GetPreparers({ ...param, ...query });
|
|
}
|
|
|
|
@ApiTags('Manage Clients - Oracle')
|
|
@Get('GetPreparerByClientid/:P_SPID/:P_CLIENTID')
|
|
GetPreparerByClientid(@Param() body: GetClientDTO) {
|
|
return this.manageClientsService.GetPreparerByClientid(body);
|
|
}
|
|
|
|
@ApiTags('Manage Clients - Oracle')
|
|
@Get('GetPreparerContactsByClientid/:P_SPID/:P_CLIENTID')
|
|
GetPreparerContactsByClientid(@Param() body: GetClientDTO) {
|
|
return this.manageClientsService.GetPreparerContactsByClientid(body);
|
|
}
|
|
|
|
@ApiTags('Manage Clients - Oracle')
|
|
@Get('GetPreparerLocByClientid/:P_SPID/:P_CLIENTID')
|
|
GetPreparerLocByClientid(@Param() body: GetClientDTO) {
|
|
return this.manageClientsService.GetPreparerLocByClientid(body);
|
|
}
|
|
}
|