forked from Yara724/api
address hardcoded
This commit is contained in:
@@ -188,6 +188,8 @@ export interface FanavaranAutoSubmitResult {
|
||||
fanavaranResponse?: unknown;
|
||||
}
|
||||
|
||||
const FANAVARAN_ACCIDENT_LOCATION_ADDRESS = "استان تهران شهر تهران";
|
||||
|
||||
@Injectable()
|
||||
export class ClaimRequestManagementService {
|
||||
private readonly logger = new Logger(ClaimRequestManagementService.name);
|
||||
@@ -3449,12 +3451,7 @@ export class ClaimRequestManagementService {
|
||||
result.AccidentTime = this.getTime24Hour(input.createdAt);
|
||||
}
|
||||
|
||||
if (input.location?.lat && input.location?.lon) {
|
||||
result.AccidentLocationAddress = await this.getAddressFromCoordinates(
|
||||
input.location.lat,
|
||||
input.location.lon,
|
||||
);
|
||||
}
|
||||
result.AccidentLocationAddress = FANAVARAN_ACCIDENT_LOCATION_ADDRESS;
|
||||
|
||||
result.EstimateAmount = input.damageParts
|
||||
? this.calculateEstimateAmount(input.damageParts)
|
||||
@@ -3613,16 +3610,7 @@ export class ClaimRequestManagementService {
|
||||
result.AccidentTime = this.getTime24Hour(blameRequest.createdAt);
|
||||
}
|
||||
|
||||
// AccidentLocationAddress: Get from reverse geocoding API
|
||||
if (
|
||||
blameRequest.firstPartyLocation?.lat &&
|
||||
blameRequest.firstPartyLocation?.lon
|
||||
) {
|
||||
result.AccidentLocationAddress = await this.getAddressFromCoordinates(
|
||||
blameRequest.firstPartyLocation.lat,
|
||||
blameRequest.firstPartyLocation.lon,
|
||||
);
|
||||
}
|
||||
result.AccidentLocationAddress = FANAVARAN_ACCIDENT_LOCATION_ADDRESS;
|
||||
|
||||
// EstimateAmount: Sum of totalPayment from damageExpertReply parts
|
||||
const damageReply =
|
||||
|
||||
Reference in New Issue
Block a user