diff --git a/src/components/content-management/DynamicTableBuilder.tsx b/src/components/content-management/DynamicTableBuilder.tsx
index 27fcbe2..d898dd1 100644
--- a/src/components/content-management/DynamicTableBuilder.tsx
+++ b/src/components/content-management/DynamicTableBuilder.tsx
@@ -3,6 +3,7 @@ import { Plus, Trash2 } from "lucide-react"
import { Button } from "../ui/button"
import { Input } from "../ui/input"
import { cn } from "../../lib/utils"
+import { UnassignedLabel } from "../../lib/displayValue"
import {
createEmptyTable,
parseTableSlotValue,
@@ -236,7 +237,7 @@ export function DynamicTableBuilder({
key={`preview-c-${ri}-${ci}`}
className="border border-grayScale-100 px-3 py-2 text-sm"
>
- {cell || unassigned}
+ {cell ||
{module.description?.trim()
? module.description
- : "unassigned"}
+ :
- {sub.description?.trim() ? sub.description : "unassigned"}
+ {sub.description?.trim() ? sub.description :
- {item.description?.trim() ? item.description : "unassigned"}
+ {item.description?.trim() ? item.description :
- {item.persona?.trim() ? item.persona : "unassigned"}
+ {item.persona?.trim() ? item.persona :
- {lesson.description?.trim() ? lesson.description : "unassigned"}
+ {lesson.description?.trim() ? lesson.description :
- {v.description?.trim() ? v.description : "unassigned"}
+ {v.description?.trim() ? v.description :
{program.description?.trim()
? program.description
- : "unassigned"}
+ :
Story
- {practice.story_description?.trim() || "unassigned"}
+ {practice.story_description?.trim() ||
- {course.description?.trim() ? course.description : "unassigned"}
+ {course.description?.trim() ? course.description :
ID: {detailData.id}
Type: {typeLabels[detailData.question_type] || detailData.question_type}
-Difficulty: {detailData.difficulty_level || "unassigned"}
+Difficulty: {detailData.difficulty_level ||
Points: {detailData.points ?? 0}
-Status: {detailData.status || "unassigned"}
-Created: {detailData.created_at || "unassigned"}
+Status: {detailData.status ||
Created: {detailData.created_at ||
- {value || "unassigned"}
+ {value ||
Status
-{selectedQuestionDetail.status || "unassigned"}
+{selectedQuestionDetail.status ||
Points
-{selectedQuestionDetail.points ?? "unassigned"}
+{selectedQuestionDetail.points ??
Difficulty
-{selectedQuestionDetail.difficulty_level || "unassigned"}
+{selectedQuestionDetail.difficulty_level ||
Type
-{selectedQuestionDetail.question_type || "unassigned"}
+{selectedQuestionDetail.question_type ||
Title: {setTitle || "unassigned"}
-Course ID: {subCourseId || "unassigned"}
-Description: {setDescription || "unassigned"}
+Title: {setTitle ||
Course ID: {subCourseId ||
Description: {setDescription ||
- Intro video URL: {introVideoUrl.trim() || "unassigned"}
+ Intro video URL: {introVideoUrl.trim() ||
Status: {setStatus}
Status: {setStatus}
Voice Prompt:{" "}
- {draft.voicePrompt.trim() || "unassigned"}
+ {draft.voicePrompt.trim() ||
Sample Answer Voice Prompt:{" "}
- {draft.sampleAnswerVoicePrompt.trim() || "unassigned"}
+ {draft.sampleAnswerVoicePrompt.trim() ||
Image URL:{" "}
- {draft.imageUrl.trim() || "unassigned"}
+ {draft.imageUrl.trim() ||
Audio Correct Answer Text:{" "}
- {draft.audioCorrectAnswerText.trim() || "unassigned"}
+ {draft.audioCorrectAnswerText.trim() ||
Tips:{" "}
- {draft.tips.trim() || "unassigned"}
+ {draft.tips.trim() ||
Explanation:{" "}
- {draft.explanation.trim() || "unassigned"}
+ {draft.explanation.trim() ||
- {question.questionText.trim() || "unassigned"}
+ {question.questionText.trim() ||
unassigned
+unassigned
+unassigned
+
- {formData.title || "unassigned"}
+ {formData.title ||
{formData.sortOrder.trim() !== ""
? formData.sortOrder.trim()
- : "unassigned"}
+ :
unassigned
", + formData.description || + "unassigned
", }} /> diff --git a/src/pages/faqs/FaqsPage.tsx b/src/pages/faqs/FaqsPage.tsx index 26fcbb5..72b6c35 100644 --- a/src/pages/faqs/FaqsPage.tsx +++ b/src/pages/faqs/FaqsPage.tsx @@ -48,6 +48,7 @@ import { CreateFaqDialog } from "./components/CreateFaqDialog" import { FaqDeleteDialog } from "./components/FaqDeleteDialog" import { FaqAccessDenied } from "./components/FaqAccessDenied" import { FaqPublicPreviewDialog } from "./components/FaqPublicPreviewDialog" +import { UnassignedLabel } from "../../lib/displayValue" type StatusFilter = "all" | FAQStatus @@ -339,7 +340,7 @@ export function FaqsPage() { {faq.category ? (
- {draft.question || "unassigned"}
+ {draft.question ||
- {draft.answer || "unassigned"}
+ {draft.answer ||
- {draft.question || "unassigned"}
+ {draft.question ||
- {draft.answer || "unassigned"}
+ {draft.answer ||
- {issue.subject?.trim() ? issue.subject : "unassigned"}
+ {issue.subject?.trim() ? issue.subject :
{issue.description?.trim() ? issue.description : "No description"}
diff --git a/src/pages/notifications/AllNotificationsPage.tsx b/src/pages/notifications/AllNotificationsPage.tsx
index e107487..aa75b2e 100644
--- a/src/pages/notifications/AllNotificationsPage.tsx
+++ b/src/pages/notifications/AllNotificationsPage.tsx
@@ -32,6 +32,7 @@ import { cn } from "../../lib/utils"
import {
DEFAULT_TABLE_PAGE_SIZE,
} from "../../lib/tablePagination"
+import { UnassignedLabel } from "../../lib/displayValue"
import {
getNotificationMessage,
getNotificationTitle,
@@ -72,7 +73,7 @@ function recipientLabel(notification: Notification): string {
if (notification.reciever) {
parts.push(notification.reciever)
}
- return parts.length > 0 ? parts.join(" · ") : "unassigned"
+ return parts.length > 0 ? parts.join(" · ") :
- {getNotificationTitle(notification) || "unassigned"}
+ {getNotificationTitle(notification) ||
- {getNotificationMessage(notification) || "unassigned"}
+ {getNotificationMessage(notification) || Channels used
- {Array.from(new Set(notifications.map((n) => n.delivery_channel))).length || "unassigned"}
+ {Array.from(new Set(notifications.map((n) => n.delivery_channel))).length ||
- {job.title || "unassigned"}
+ {job.title || {job.message}
- {summary.titlePreview || "unassigned"}
+ {summary.titlePreview || {summary.messagePreview || "unassigned"} {summary.messagePreview ||
Template: {summary.emailTemplateSlug}
diff --git a/src/pages/payments/PaymentsPage.tsx b/src/pages/payments/PaymentsPage.tsx
index dfc0cb2..a815e1f 100644
--- a/src/pages/payments/PaymentsPage.tsx
+++ b/src/pages/payments/PaymentsPage.tsx
@@ -61,6 +61,7 @@ import type {
} from "../../types/payment.types"
import { DEFAULT_TABLE_PAGE_SIZE, TABLE_PAGE_SIZE_OPTIONS } from "../../lib/tablePagination"
+import { UnassignedLabel } from "../../lib/displayValue"
const STATUS_FILTERS: { value: PaymentStatus; label: string }[] = [
{ value: "PENDING", label: "Pending" },
@@ -518,7 +519,7 @@ export function PaymentsPage() {
#{payment.id}
- {payment.transaction_id || payment.session_id || "unassigned"}
+ {payment.transaction_id || payment.session_id ||
{label}
{value}
+ {typeof value === "string" && isUnassignedLabel(value) ?
{label}
{value}
+ {typeof value === "string" && isUnassignedLabel(value) ?
- {displayValue(member.job_title)}
+
- {logs[0]?.created_at ? getRelativeActivityTime(logs[0].created_at) : "unassigned"}
+ {logs[0]?.created_at ? getRelativeActivityTime(logs[0].created_at) : Latest on this page {item.email} {item.phone_number || "unassigned"} {item.phone_number || {item.role || "unassigned"} {item.status || "unassigned"} {item.role || {item.status || {label} {value}
+ {typeof value === "string" && isUnassignedLabel(value) ?
@@ -716,11 +717,11 @@ export function PaymentsPage() {
{fullName}