This commit is contained in:
@@ -91,8 +91,6 @@ export class CartService {
|
||||
address: address.address,
|
||||
latitude: address.latitude,
|
||||
longitude: address.longitude,
|
||||
city: address.city,
|
||||
province: address.province || '',
|
||||
postalCode: address.postalCode || undefined,
|
||||
fullName: `${address.user.firstName || ''} ${address.user.lastName || ''}`.trim(),
|
||||
phone: address.user.phone,
|
||||
@@ -319,8 +317,6 @@ export class CartService {
|
||||
address: address.address,
|
||||
latitude: address.latitude,
|
||||
longitude: address.longitude,
|
||||
city: address.city,
|
||||
province: address.province || '',
|
||||
postalCode: address.postalCode || undefined,
|
||||
fullName: `${address.user.firstName || ''} ${address.user.lastName || ''}`.trim(),
|
||||
phone: address.user.phone,
|
||||
|
||||
@@ -4,8 +4,6 @@ export interface OrderUserAddress {
|
||||
address?: string;
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
city: string;
|
||||
province: string;
|
||||
postalCode?: string;
|
||||
fullName: string;
|
||||
phone: string;
|
||||
|
||||
@@ -473,8 +473,6 @@ console.log(cart);
|
||||
return {
|
||||
fullName: [user.firstName, user.lastName].filter(Boolean).join(' '),
|
||||
phone: address.phone || user.phone,
|
||||
city: address.city,
|
||||
province: address.province || '',
|
||||
address: address.address,
|
||||
postalCode: address.postalCode ?? undefined,
|
||||
latitude: address.latitude,
|
||||
|
||||
@@ -13,15 +13,6 @@ export class CreateUserAddressDto {
|
||||
@IsString()
|
||||
address!: string;
|
||||
|
||||
@ApiProperty({ description: 'City name', example: 'Tehran' })
|
||||
@IsString()
|
||||
city!: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Province', example: 'Tehran Province' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
province?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Postal/ZIP code', example: '12345-6789' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
@@ -15,16 +15,6 @@ export class UpdateUserAddressDto {
|
||||
@IsString()
|
||||
address?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'City name', example: 'Tehran' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
city?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Province', example: 'Tehran Province' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
province?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Postal/ZIP code', example: '12345-6789' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
@@ -14,12 +14,6 @@ export class UserAddress extends BaseEntity {
|
||||
@Property()
|
||||
address!: string;
|
||||
|
||||
@Property()
|
||||
city!: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
province?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
postalCode?: string | null = null;
|
||||
|
||||
|
||||
@@ -310,8 +310,6 @@ export class UserService {
|
||||
user,
|
||||
title: dto.title,
|
||||
address: dto.address,
|
||||
city: dto.city,
|
||||
province: dto.province,
|
||||
postalCode: dto.postalCode,
|
||||
latitude: dto.latitude,
|
||||
longitude: dto.longitude,
|
||||
|
||||
Reference in New Issue
Block a user