This commit is contained in:
pradeepkumar
2026-04-08 04:15:43 +05:30
parent 457d4e47f9
commit aabb06e520

View File

@@ -299,7 +299,7 @@ export default function CmsPage() {
const fieldValues = res.data?.data?.fieldValues || res.data?.data || []; const fieldValues = res.data?.data?.fieldValues || res.data?.data || [];
for (const fv of fieldValues) { for (const fv of fieldValues) {
const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase(); const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase();
const value = fv.value ?? fv.jsonValue ?? fv.textValue; const value = fv.valueLabel ?? fv.value ?? fv.jsonValue ?? fv.textValue;
if (value == null || value === '') continue; if (value == null || value === '') continue;
// Location: city/state fields // Location: city/state fields
@@ -368,7 +368,7 @@ export default function CmsPage() {
const fieldValues = res.data?.data?.fieldValues || res.data?.data || []; const fieldValues = res.data?.data?.fieldValues || res.data?.data || [];
for (const fv of fieldValues) { for (const fv of fieldValues) {
const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase(); const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase();
const value = fv.value ?? fv.jsonValue ?? fv.textValue; const value = fv.valueLabel ?? fv.value ?? fv.jsonValue ?? fv.textValue;
if (value == null || value === '') continue; if (value == null || value === '') continue;
if ((slug === 'city' || slug === 'state') && !location) { if ((slug === 'city' || slug === 'state') && !location) {