use single ENUMS; change old realEstateType enums
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
const { currentSearchRequest } = require("../helpers/url");
|
||||
const {
|
||||
realEstateTypes,
|
||||
getEnumTypeTitle,
|
||||
getRealEstateTypeEnum
|
||||
} = require("../helpers/enums");
|
||||
const { AD_CATEGORY } = require("../common/enums");
|
||||
|
||||
const getQueryReview = async (req, res) => {
|
||||
const title = "Da li je ovo to što ste tražili ?";
|
||||
@@ -25,13 +21,13 @@ const getQueryReview = async (req, res) => {
|
||||
priceMax
|
||||
} = searchRequest.dataValues;
|
||||
|
||||
const realEstateTypeObject = getRealEstateTypeEnum(realEstateType);
|
||||
const realEstateTypeObject = AD_CATEGORY[realEstateType];
|
||||
const enableGardenSizeEdit = realEstateTypeObject
|
||||
? realEstateTypeObject.hasGardenSize
|
||||
: false;
|
||||
|
||||
const realEstateTypeTitle = realEstateType
|
||||
? getEnumTypeTitle(realEstateTypes, realEstateType)
|
||||
const realEstateTypeTitle = realEstateTypeObject
|
||||
? realEstateTypeObject.title
|
||||
: "-";
|
||||
|
||||
const locationTitle = "Location description - PLACEHOLDER";
|
||||
|
||||
Reference in New Issue
Block a user