19-08-2025 api modifications

This commit is contained in:
Kallesh B S 2025-08-19 17:27:14 +05:30
parent 75a537aab4
commit 0e59a652b0
3 changed files with 11 additions and 11 deletions

View File

@ -67,17 +67,17 @@ export class APPLICATIONNAME_DTO {
}
export class GOODS_PORT_DTO {
@ApiProperty({ required: true })
@ApiProperty({ required: true, type: String, nullable: true })
@IsString({ message: 'Property P_GOODSPORT must be a string' })
@IsDefined({ message: 'Property P_GOODSPORT is required' })
P_GOODSPORT: string;
P_GOODSPORT: string | null = null;
}
export class GOODS_COUNTRY_DTO {
@ApiProperty({ required: true })
@ApiProperty({ required: true, type: String, nullable: true })
@IsString({ message: 'Property P_GOODSCOUNTRY must be a string' })
@IsDefined({ message: 'Property P_GOODSCOUNTRY is required' })
P_GOODSCOUNTRY: string;
P_GOODSCOUNTRY: string | null = null;
}
export class REASON_CODE_DTO {
@ -97,7 +97,7 @@ export class EXTENSION_PERIOD_DTO {
@IsNumber({}, { message: 'Property P_EXTENSIONPERIOD must be a number' })
@Transform(({ value }) => Number(value))
@IsDefined({ message: 'Property P_EXTENSIONPERIOD is required' })
P_EXTENSIONPERIOD: number;
P_EXTENSIONPERIOD: number = 0;
}
export class ORDERTYPE_DTO {
@ -330,7 +330,7 @@ export class USSETS_DTO {
@Transform(({ value }) => Number(value))
@IsNumber({}, { message: 'Property P_USSETS must be a number' })
@IsDefined({ message: 'Property P_USSETS is required' })
P_USSETS: number;
P_USSETS: number = 0;
}
export enum VOT {

View File

@ -60,10 +60,10 @@ export class SaveExtensionApplicationDTO extends (IntersectionType(
USERID_DTO,
SPID_DTO,
HEADERID_DTO,
GOODS_PORT_DTO,
GOODS_COUNTRY_DTO,
PartialType(GOODS_PORT_DTO),
PartialType(GOODS_COUNTRY_DTO),
REASON_CODE_DTO,
EXTENSION_PERIOD_DTO
PartialType(EXTENSION_PERIOD_DTO)
)) { }
export class PrintCarnetDTO extends (IntersectionType(SPID_DTO, HEADERID_DTO, PRINTGL_DTO)) { }
@ -98,7 +98,7 @@ export class DeleteGenerallistItemsDTO extends IntersectionType(
) { }
export class AddCountriesDTO extends IntersectionType(
HEADERID_DTO, USSETS_DTO, COUNTRYTABLE_DTO, USERID_DTO
HEADERID_DTO, PartialType(USSETS_DTO), COUNTRYTABLE_DTO, USERID_DTO
) { }
export class UpdateShippingDetailsDTO extends IntersectionType(

View File

@ -965,7 +965,7 @@ export class CarnetApplicationService {
}
// return { statusCode: 200, message: "Extended successfully", ...fres[0] };
return fres;
return fres.length > 0 ? fres[0] : [];
} catch (error) {
handleError(error, CarnetApplicationService.name)
} finally {