Compare commits

...

2 Commits

Author SHA1 Message Date
Kallesh B S
d932953950 updated faxno as optional every-where and create-logins response updated 2025-06-16 10:33:27 +05:30
Kallesh B S
c79b37d2e0 client contact controls API updated 2025-06-13 12:54:08 +05:30
4 changed files with 35 additions and 12 deletions

View File

@ -60,7 +60,7 @@ export class UpdateClientContactsDTO extends IntersectionType(
PartialType(MIDDLE_INITIAL_DTO), PartialType(MIDDLE_INITIAL_DTO),
PartialType(TITLE_DTO), PartialType(TITLE_DTO),
PHONE_NO_DTO, PHONE_NO_DTO,
FAX_NO_DTO, PartialType(FAX_NO_DTO),
PartialType(MOBILE_NO_DTO), PartialType(MOBILE_NO_DTO),
EMAIL_ADDRESS_DTO, EMAIL_ADDRESS_DTO,
USERID_DTO USERID_DTO

View File

@ -1,4 +1,4 @@
import { IntersectionType } from '@nestjs/swagger'; import { IntersectionType, PartialType } from '@nestjs/swagger';
import { import {
DEFAULT_CONTACT_FLAG_DTO, EMAIL_ADDRESS_DTO, FAX_NO_DTO, DEFAULT_CONTACT_FLAG_DTO, EMAIL_ADDRESS_DTO, FAX_NO_DTO,
@ -10,11 +10,11 @@ import { SPID_DTO } from '../sp/sp-property.dto';
export class InsertSPContactsDTO extends IntersectionType( export class InsertSPContactsDTO extends IntersectionType(
SPID_DTO, DEFAULT_CONTACT_FLAG_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, TITLE_DTO, SPID_DTO, DEFAULT_CONTACT_FLAG_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, TITLE_DTO,
PHONE_NO_DTO, MOBILE_NO_DTO, FAX_NO_DTO, EMAIL_ADDRESS_DTO, USER_ID_DTO PHONE_NO_DTO, MOBILE_NO_DTO, PartialType(FAX_NO_DTO), EMAIL_ADDRESS_DTO, USER_ID_DTO
) { } ) { }
export class UpdateSPContactsDTO extends IntersectionType( export class UpdateSPContactsDTO extends IntersectionType(
SP_CONTACTID_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, TITLE_DTO, PHONE_NO_DTO, SP_CONTACTID_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, TITLE_DTO, PHONE_NO_DTO,
MOBILE_NO_DTO, FAX_NO_DTO, EMAIL_ADDRESS_DTO, USER_ID_DTO MOBILE_NO_DTO, PartialType(FAX_NO_DTO), EMAIL_ADDRESS_DTO, USER_ID_DTO
) { } ) { }

View File

@ -45,19 +45,19 @@ export class ManageClientsController {
} }
@ApiTags('Manage Clients - Oracle') @ApiTags('Manage Clients - Oracle')
@Patch('SetDefaultClientContacts/:P_SPID/:P_CLIENTID/:P_USERID') @Patch('SetDefaultClientContacts/:P_SPID/:P_CLIENTCONTACTID/:P_USERID')
SetDefaultClientContacts(@Param() param: ClientContactControlsDTO) { SetDefaultClientContacts(@Param() param: ClientContactControlsDTO) {
return this.manageClientsService.SetDefaultClientContacts(param); return this.manageClientsService.SetDefaultClientContacts(param);
} }
@ApiTags('Manage Clients - Oracle') @ApiTags('Manage Clients - Oracle')
@Patch('InactivateClientContacts/:P_SPID/:P_CLIENTID/:P_USERID') @Patch('InactivateClientContacts/:P_SPID/:P_CLIENTCONTACTID/:P_USERID')
InactivateClientContacts(@Param() param: ClientContactControlsDTO) { InactivateClientContacts(@Param() param: ClientContactControlsDTO) {
return this.manageClientsService.InactivateClientContacts(param); return this.manageClientsService.InactivateClientContacts(param);
} }
@ApiTags('Manage Clients - Oracle') @ApiTags('Manage Clients - Oracle')
@Patch('ReactivateClientContacts/:P_SPID/:P_CLIENTID/:P_USERID') @Patch('ReactivateClientContacts/:P_SPID/:P_CLIENTCONTACTID/:P_USERID')
ReactivateClientContacts(@Param() param: ClientContactControlsDTO) { ReactivateClientContacts(@Param() param: ClientContactControlsDTO) {
return this.manageClientsService.ReactivateClientContacts(param); return this.manageClientsService.ReactivateClientContacts(param);
} }

View File

@ -9,6 +9,7 @@ import {
EMAIL_DTO, USERID_DTO, EMAIL_DTO, USERID_DTO,
CreateClientLoginsDTO, CreateSPLoginsDTO, CreateUSCIBLoginsDTO, SPID_CLIENTID_DTO, SPID_EMAIL_DTO CreateClientLoginsDTO, CreateSPLoginsDTO, CreateUSCIBLoginsDTO, SPID_CLIENTID_DTO, SPID_EMAIL_DTO
} from 'src/dto/property.dto'; } from 'src/dto/property.dto';
import { BadRequestException } from 'src/exceptions/badRequest.exception';
interface RoleDetail { [key: string]: any; } interface RoleDetail { [key: string]: any; }
@ -172,9 +173,15 @@ export class UserMaintenanceService {
throw new InternalServerException("Incomplete data received from the database."); throw new InternalServerException("Incomplete data received from the database.");
} }
return { const fres: any = await fetchCursor(outBinds.P_CURSOR, UserMaintenanceService.name);
data: await fetchCursor(outBinds.P_CURSOR),
}; if (fres.length > 0 && fres[0].ERRORMESG) {
this.logger.warn(fres[0].ERRORMESG);
throw new BadRequestException(fres[0].ERRORMESG)
}
return { statusCode: 201, message: "Created successfully", ...fres[0] };
} catch (error) { } catch (error) {
handleError(error, UserMaintenanceService.name) handleError(error, UserMaintenanceService.name)
} finally { } finally {
@ -250,7 +257,15 @@ export class UserMaintenanceService {
throw new InternalServerException("Incomplete data received from the database."); throw new InternalServerException("Incomplete data received from the database.");
} }
return await fetchCursor(outBinds.P_CURSOR, UserMaintenanceService.name); const fres: any = await fetchCursor(outBinds.P_CURSOR, UserMaintenanceService.name);
if (fres.length > 0 && fres[0].ERRORMESG) {
this.logger.warn(fres[0].ERRORMESG);
throw new BadRequestException(fres[0].ERRORMESG)
}
return { statusCode: 201, message: "Created successfully", ...fres[0] };
} catch (error) { } catch (error) {
handleError(error, UserMaintenanceService.name) handleError(error, UserMaintenanceService.name)
} finally { } finally {
@ -359,7 +374,15 @@ export class UserMaintenanceService {
throw new InternalServerException("Incomplete data received from the database."); throw new InternalServerException("Incomplete data received from the database.");
} }
return await fetchCursor(outBinds.P_CURSOR, UserMaintenanceService.name); const fres: any = await fetchCursor(outBinds.P_CURSOR, UserMaintenanceService.name);
if (fres.length > 0 && fres[0].ERRORMESG) {
this.logger.warn(fres[0].ERRORMESG);
throw new BadRequestException(fres[0].ERRORMESG)
}
return { statusCode: 201, message: "Created successfully", ...fres[0] };
} catch (error) { } catch (error) {
handleError(error, UserMaintenanceService.name) handleError(error, UserMaintenanceService.name)
} finally { } finally {