@@ -135,11 +140,16 @@ const TaskView = ({ taskId, onEditTask }: TaskViewProps) => {
onReorder={(activeId: any, overId: any) => {
handleSubtaskReorder(activeId, overId);
}}
+ disabled={!isDraft}
>
{displaySubtasks.map((subtask: any) => (
{({ listeners }: any) => (
-
+
)}
))}
diff --git a/src/components/ui/atoms/sortable.tsx b/src/components/ui/atoms/sortable.tsx
index d3b4944..4799e42 100644
--- a/src/components/ui/atoms/sortable.tsx
+++ b/src/components/ui/atoms/sortable.tsx
@@ -17,7 +17,12 @@ import {
} from "@dnd-kit/modifiers";
import { CSS } from "@dnd-kit/utilities";
-export function SortableList({ items, onReorder, children }: any) {
+export function SortableList({
+ items,
+ onReorder,
+ children,
+ disabled = false,
+}: any) {
const sensors = useSensors(
useSensor(PointerSensor, {
activationConstraint: {
@@ -27,6 +32,8 @@ export function SortableList({ items, onReorder, children }: any) {
);
const handleDragEnd = (event: DragEndEvent) => {
+ if (disabled) return;
+
const { active, over } = event;
if (over && active.id !== over.id) {
@@ -36,7 +43,7 @@ export function SortableList({ items, onReorder, children }: any) {
return (
{

diff --git a/src/components/ui/molecules/form-upload/InlineImageUpload.tsx b/src/components/ui/molecules/form-upload/InlineImageUpload.tsx
index ba3aabe..ff246ea 100644
--- a/src/components/ui/molecules/form-upload/InlineImageUpload.tsx
+++ b/src/components/ui/molecules/form-upload/InlineImageUpload.tsx
@@ -79,8 +79,10 @@ const InlineImageUpload = ({
alt={selectedFile.name}
className="rounded-lg h-full border w-32 object-cover"
/>
-
-
{selectedFile?.name}
+
+
+ {selectedFile?.name}
+
@@ -345,7 +361,10 @@ const ProfileEditForm = ({
getUrlError(sp.account, sp.url))
+ }
>
{updateProfileMutation.isPending ? "Saving..." : "Save Changes"}
diff --git a/src/lib/constant.ts b/src/lib/constant.ts
index e51446b..9103067 100644
--- a/src/lib/constant.ts
+++ b/src/lib/constant.ts
@@ -26,7 +26,14 @@ export const SOCIAL_PLATFORMS = [
{ value: "instagram", label: "Instagram", icon: "Instagram" },
{ value: "tiktok", label: "TikTok", icon: "TikTok" },
];
-
+export const PLATFORM_PATTERNS: Record
= {
+ facebook: /facebook\.com/i,
+ "x.com": /(x\.com|twitter\.com)/i,
+ linkedin: /linkedin\.com/i,
+ youtube: /(youtube\.com|youtu\.be)/i,
+ instagram: /instagram\.com/i,
+ tiktok: /tiktok\.com/i,
+};
export const TIBETAN_LETTERS = [
"ཀ",
"ཁ",
From f0ef35c9299bbd8a761326554ccae1eaf5a1d71c Mon Sep 17 00:00:00 2001
From: Tenzin Youdon <94886097+Tech-lo@users.noreply.github.com>
Date: Tue, 13 Jan 2026 20:51:03 +0530
Subject: [PATCH 13/17] status update fix (#141)
* status update fix
* lint
---
.../routes/task/PlanDetailsPage.test.tsx | 45 +++++--------------
.../routes/task/PlanDetailsPage.tsx | 26 +++--------
.../task/components/view/TaskForm.test.tsx | 16 +++++++
.../dropdown-button/DropdownButton.tsx | 1 +
4 files changed, 34 insertions(+), 54 deletions(-)
diff --git a/src/components/routes/task/PlanDetailsPage.test.tsx b/src/components/routes/task/PlanDetailsPage.test.tsx
index c7d6a92..20e310c 100644
--- a/src/components/routes/task/PlanDetailsPage.test.tsx
+++ b/src/components/routes/task/PlanDetailsPage.test.tsx
@@ -99,16 +99,10 @@ const renderWithProviders = (component: React.ReactElement, isDraft = true) => {
queries: { retry: false },
},
});
- if (isDraft) {
- queryClient.setQueryData(["dashboard-plans"], {
- plans: [
- {
- id: "test-plan-id",
- status: "DRAFT",
- },
- ],
- });
- }
+ queryClient.setQueryData(["planDetails", "test-plan-id"], {
+ ...mockPlanData,
+ status: isDraft ? "DRAFT" : "ARCHIVED",
+ });
return render(
{component}
@@ -206,30 +200,15 @@ describe("PlanDetailsPanel Component", () => {
expect(screen.getByPlaceholderText("Task Title")).toBeInTheDocument();
});
- it("switches to task view after creating a new task", async () => {
+ it("switches to task view after clicking a task", async () => {
const { default: axiosInstance } = await import("@/config/axios-config");
const mockAxios = axiosInstance as any;
- mockAxios.post.mockImplementation((url: string, data?: any) => {
- if (url.includes("/tasks")) {
- return Promise.resolve({
- data: {
- id: "newly-created-task-123",
- title: data?.title || "New Task",
- display_order: 1,
- estimated_time: 30,
- },
- });
- }
- return Promise.resolve({
- data: { id: "new-day-id", day_number: 5, tasks: [] },
- });
- });
mockAxios.get.mockImplementation((url: string) => {
- if (url.includes("/tasks/newly-created-task-123")) {
+ if (url.includes("/tasks/task1")) {
return Promise.resolve({
data: {
- id: "newly-created-task-123",
- title: "New Task",
+ id: "task1",
+ title: "Morning Intention Setting",
display_order: 1,
estimated_time: 30,
subtasks: [],
@@ -242,17 +221,13 @@ describe("PlanDetailsPanel Component", () => {
await waitFor(() => {
expect(screen.getByText(mockPlanData.title)).toBeInTheDocument();
});
- const titleInput = screen.getByPlaceholderText("Task Title");
- fireEvent.change(titleInput, { target: { value: "New Task" } });
- fireEvent.click(screen.getByText("Submit"));
+ expect(screen.getByText("Add Task")).toBeInTheDocument();
+ fireEvent.click(screen.getByText("Morning Intention Setting"));
await waitFor(() => {
expect(screen.queryByText("Add Task")).not.toBeInTheDocument();
});
await waitFor(() => {
expect(screen.getByText("Task")).toBeInTheDocument();
});
- await waitFor(() => {
- expect(screen.getByText("New Task")).toBeInTheDocument();
- });
});
});
diff --git a/src/components/routes/task/PlanDetailsPage.tsx b/src/components/routes/task/PlanDetailsPage.tsx
index 77c5cfe..2cff727 100644
--- a/src/components/routes/task/PlanDetailsPage.tsx
+++ b/src/components/routes/task/PlanDetailsPage.tsx
@@ -1,9 +1,10 @@
import { useState } from "react";
import { useParams } from "react-router-dom";
-import { useQueryClient } from "@tanstack/react-query";
+import { useQuery } from "@tanstack/react-query";
import TaskForm from "./components/view/TaskForm";
import SideBar from "./components/sidebar-component/SideBar";
import TaskView from "./components/view/TaskView";
+import { fetchPlanDetails } from "./api/planApi";
const PlanDetailsPage = () => {
const [selectedDay, setSelectedDay] = useState(1);
@@ -11,26 +12,13 @@ const PlanDetailsPage = () => {
const [editingTask, setEditingTask] = useState(null);
const { plan_id } = useParams<{ plan_id: string }>();
- const queryClient = useQueryClient();
-
- const dashboardQueries = queryClient.getQueriesData({
- queryKey: ["dashboard-plans"],
+ const { data: planDetails } = useQuery({
+ queryKey: ["planDetails", plan_id],
+ queryFn: () => fetchPlanDetails(plan_id!),
+ enabled: !!plan_id,
});
- let cachedStatus: string | undefined;
- for (const [, queryData] of dashboardQueries) {
- if (queryData?.plans) {
- const cachedPlan = queryData.plans.find(
- (plan: any) => plan.id === plan_id,
- );
- if (cachedPlan?.status) {
- cachedStatus = cachedPlan.status;
- break;
- }
- }
- }
-
- const status = cachedStatus || "DRAFT";
+ const status = planDetails?.status || "DRAFT";
const isDraft = status === "DRAFT";
const handleDaySelect = (dayNumber: number) => {
diff --git a/src/components/routes/task/components/view/TaskForm.test.tsx b/src/components/routes/task/components/view/TaskForm.test.tsx
index 35fe4e0..0112968 100644
--- a/src/components/routes/task/components/view/TaskForm.test.tsx
+++ b/src/components/routes/task/components/view/TaskForm.test.tsx
@@ -278,6 +278,14 @@ describe("TaskForm Component", () => {
renderWithProviders();
const titleInput = screen.getByPlaceholderText("Task Title");
fireEvent.change(titleInput, { target: { value: "New Task" } });
+
+ fireEvent.click(screen.getByText("Add Text"));
+ await waitFor(() => {
+ expect(
+ screen.getByPlaceholderText("Enter your text content"),
+ ).toBeInTheDocument();
+ });
+
const submitButton = screen.getByText("Submit");
fireEvent.click(submitButton);
await waitFor(() => {
@@ -377,6 +385,14 @@ describe("TaskForm Component", () => {
renderWithProviders();
const titleInput = screen.getByPlaceholderText("Task Title");
fireEvent.change(titleInput, { target: { value: "New Task" } });
+
+ fireEvent.click(screen.getByText("Add Text"));
+ await waitFor(() => {
+ expect(
+ screen.getByPlaceholderText("Enter your text content"),
+ ).toBeInTheDocument();
+ });
+
const submitButton = screen.getByText("Submit");
fireEvent.click(submitButton);
await waitFor(() => {
diff --git a/src/components/ui/molecules/dropdown-button/DropdownButton.tsx b/src/components/ui/molecules/dropdown-button/DropdownButton.tsx
index 58c7cad..bb9ab93 100644
--- a/src/components/ui/molecules/dropdown-button/DropdownButton.tsx
+++ b/src/components/ui/molecules/dropdown-button/DropdownButton.tsx
@@ -72,6 +72,7 @@ export function DropdownButton({
toast.success(`Status updated to ${newStatus}`);
queryClient.refetchQueries({ queryKey: ["dashboard-plans"] });
+ queryClient.invalidateQueries({ queryKey: ["planDetails", planId] });
} catch (error: any) {
toast.error(error.response.data.detail.message);
}
From 933a73eda89e3559897f3bce329d7062a4900ad4 Mon Sep 17 00:00:00 2001
From: TenzDelek <122612557+TenzDelek@users.noreply.github.com>
Date: Thu, 29 Jan 2026 10:15:30 +0530
Subject: [PATCH 14/17] Hide (#142)
* hide alphabets
* build fix
---
src/components/ui/atoms/studio-card.tsx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/components/ui/atoms/studio-card.tsx b/src/components/ui/atoms/studio-card.tsx
index 375a09e..5d09b29 100644
--- a/src/components/ui/atoms/studio-card.tsx
+++ b/src/components/ui/atoms/studio-card.tsx
@@ -1,4 +1,3 @@
-import { TIBETAN_LETTERS } from "@/lib/constant";
import pechaIcon from "../../../assets/icon/pecha_icon.png";
interface ContainerLayoutProps {
@@ -38,7 +37,7 @@ const ContainerLayout = ({ children, title }: ContainerLayoutProps) => {
-
+ {/*
{TIBETAN_LETTERS.map((letter, index) => (
{
))}
-
+
*/}
);
};
From 29ed14cadbb2acf008d2ce8fc65df413b448f2d8 Mon Sep 17 00:00:00 2001
From: Tenzin Youdon <94886097+Tech-lo@users.noreply.github.com>
Date: Fri, 6 Feb 2026 14:16:38 +0530
Subject: [PATCH 15/17] Updateapistruct (#143)
* update as per updated backend
* correct segment id
* lint
---
src/components/routes/task/api/taskApi.ts | 4 ++++
.../routes/task/components/view/TaskForm.tsx | 22 +++++++++++++++++--
.../content-sub/ContentTypeSelector.tsx | 12 +++++++---
.../ui/molecules/subtask-card/SubTaskCard.tsx | 2 ++
.../webuddhist-source/SourceSelectorSheet.tsx | 14 ++++++++----
.../webuddhist-source/sourceItem.tsx | 8 ++++++-
6 files changed, 52 insertions(+), 10 deletions(-)
diff --git a/src/components/routes/task/api/taskApi.ts b/src/components/routes/task/api/taskApi.ts
index feecf8b..d6fa0a7 100644
--- a/src/components/routes/task/api/taskApi.ts
+++ b/src/components/routes/task/api/taskApi.ts
@@ -44,6 +44,8 @@ export const createSubTasks = async (
content_type: string;
display_order: number;
duration?: string;
+ source_text_id?: string | null;
+ pecha_segment_id?: string | null;
}[],
) => {
const { data } = await axiosInstance.post(
@@ -67,6 +69,8 @@ export const updateSubTasks = async (
content_type: string;
display_order: number;
duration?: string;
+ source_text_id?: string | null;
+ pecha_segment_id?: string | null;
}[],
) => {
await axiosInstance.put(
diff --git a/src/components/routes/task/components/view/TaskForm.tsx b/src/components/routes/task/components/view/TaskForm.tsx
index f3e19fc..d47f6bc 100644
--- a/src/components/routes/task/components/view/TaskForm.tsx
+++ b/src/components/routes/task/components/view/TaskForm.tsx
@@ -81,6 +81,10 @@ const TaskForm = ({
display_order: index + 1,
...(subTask.content_type === "VIDEO" &&
subTask.duration && { duration: subTask.duration }),
+ ...(subTask.content_type === "SOURCE_REFERENCE" && {
+ source_text_id: subTask.source_text_id || null,
+ pecha_segment_id: subTask.pecha_segment_id || null,
+ }),
}));
await createSubTasks(taskResponse.id, subTasksPayload);
}
@@ -109,6 +113,10 @@ const TaskForm = ({
display_order: index + 1,
...(subTask.content_type === "VIDEO" &&
subTask.duration && { duration: subTask.duration }),
+ ...(subTask.content_type === "SOURCE_REFERENCE" && {
+ source_text_id: subTask.source_text_id || null,
+ pecha_segment_id: subTask.pecha_segment_id || null,
+ }),
}));
await updateSubTasks(editingTask.id, subTasksPayload);
},
@@ -182,6 +190,8 @@ const TaskForm = ({
id: data.id,
content_type: "SOURCE_REFERENCE",
content: data.content,
+ source_text_id: data.source_text_id || null,
+ pecha_segment_id: data.pecha_segment_id || null,
};
default:
return {
@@ -195,7 +205,13 @@ const TaskForm = ({
}
}, [editingTask?.id, selectedDay, taskDetails?.id]);
- const handleAddSubTask = (content_type: any, sourceContent?: string) => {
+ interface SourceData {
+ content: string;
+ segment_id: string;
+ text_id: string;
+ }
+
+ const handleAddSubTask = (content_type: any, sourceData?: SourceData) => {
let newSubTask: SubTask;
switch (content_type) {
@@ -233,7 +249,9 @@ const TaskForm = ({
newSubTask = {
id: null,
content_type: "SOURCE_REFERENCE",
- content: sourceContent || "",
+ content: sourceData?.content || "",
+ source_text_id: sourceData?.text_id || null,
+ pecha_segment_id: sourceData?.segment_id || null,
};
break;
}
diff --git a/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx b/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx
index 42bd1ba..3e84d40 100644
--- a/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx
+++ b/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx
@@ -6,10 +6,16 @@ import pechaIcon from "@/assets/icon/pecha_icon.png";
import { useState } from "react";
import { SourceSelectorSheet } from "../webuddhist-source/SourceSelectorSheet";
+interface SourceData {
+ content: string;
+ segment_id: string;
+ text_id: string;
+}
+
interface ContentTypeSelectorProps {
onSelectType: (
type: "IMAGE" | "VIDEO" | "AUDIO" | "TEXT" | "SOURCE_REFERENCE",
- sourceContent?: string,
+ sourceData?: SourceData,
) => void;
}
@@ -53,8 +59,8 @@ export const ContentTypeSelector = ({
}
};
- const handleAddSource = (sourceContent: string) => {
- onSelectType("SOURCE_REFERENCE", sourceContent);
+ const handleAddSource = (sourceData: SourceData) => {
+ onSelectType("SOURCE_REFERENCE", sourceData);
setIsSourceSheetOpen(false);
};
diff --git a/src/components/ui/molecules/subtask-card/SubTaskCard.tsx b/src/components/ui/molecules/subtask-card/SubTaskCard.tsx
index 44fa021..646e8ab 100644
--- a/src/components/ui/molecules/subtask-card/SubTaskCard.tsx
+++ b/src/components/ui/molecules/subtask-card/SubTaskCard.tsx
@@ -44,6 +44,8 @@ interface SourceSubTask {
content_type: "SOURCE_REFERENCE";
content: string;
display_order?: number;
+ source_text_id?: string | null;
+ pecha_segment_id?: string | null;
}
export type SubTask =
| VideoSubTask
diff --git a/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx b/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx
index 13652da..2e3eaa1 100644
--- a/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx
+++ b/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx
@@ -10,10 +10,16 @@ import { Pagination } from "@/components/ui/molecules/pagination/Pagination";
import { searchSources } from "@/components/api/searchApi";
import { LANGUAGE } from "@/lib/constant";
+interface SourceData {
+ content: string;
+ segment_id: string;
+ text_id: string;
+}
+
interface SourceSelectorSheetProps {
isOpen: boolean;
onOpenChange: (open: boolean) => void;
- onAddSource: (sourceContent: string) => void;
+ onAddSource: (sourceData: SourceData) => void;
}
export const SourceSelectorSheet = ({
@@ -55,9 +61,9 @@ export const SourceSelectorSheet = ({
};
const { t } = useTranslate();
- const handleAddSource = (content: any) => {
- if (content) {
- onAddSource(content);
+ const handleAddSource = (sourceData: SourceData) => {
+ if (sourceData?.content) {
+ onAddSource(sourceData);
onOpenChange(false);
}
};
diff --git a/src/components/ui/molecules/webuddhist-source/sourceItem.tsx b/src/components/ui/molecules/webuddhist-source/sourceItem.tsx
index 5ad5852..2e3082b 100644
--- a/src/components/ui/molecules/webuddhist-source/sourceItem.tsx
+++ b/src/components/ui/molecules/webuddhist-source/sourceItem.tsx
@@ -14,7 +14,13 @@ const SourceItem = ({ source, onSegment }: any) => {
onSegment?.(segment.content)}
+ onClick={() =>
+ onSegment?.({
+ content: segment.content,
+ segment_id: segment.pecha_segment_id,
+ text_id: source.text.text_id,
+ })
+ }
>
From 10f2ce398cc917c3c711e92d7784ed48632d968a Mon Sep 17 00:00:00 2001
From: Tenzin Youdon <94886097+Tech-lo@users.noreply.github.com>
Date: Tue, 10 Feb 2026 15:41:46 +0530
Subject: [PATCH 16/17] remove state (#146)
---
src/components/auth/login/Login.tsx | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/components/auth/login/Login.tsx b/src/components/auth/login/Login.tsx
index c2947c9..6f1d2c1 100644
--- a/src/components/auth/login/Login.tsx
+++ b/src/components/auth/login/Login.tsx
@@ -17,7 +17,6 @@ const Login = () => {
const { t } = useTranslate();
const navigate = useNavigate();
const [email, setEmail] = useState("");
- const [password, setPassword] = useState("");
const [errors, setErrors] = useState("");
const [successMessage, setSuccessMessage] = useState("");
const [showEmailReverify, setShowEmailReverify] = useState(false);
@@ -69,10 +68,12 @@ const Login = () => {
},
});
- const handleLogin = (e: React.FormEvent) => {
+ const handleLogin = (e: React.FormEvent) => {
e.preventDefault();
setShowEmailReverify(false);
setSuccessMessage("");
+ const formData = new FormData(e.currentTarget);
+ const password = formData.get("password") as string;
const clientPassword = createPasswordHash(email, password);
loginMutation.mutate({
email,
@@ -111,13 +112,10 @@ const Login = () => {
{
- setPassword(e.target.value);
- }}
/>
From e95f467133135f94fa20414ea670c7a403a2b8bf Mon Sep 17 00:00:00 2001
From: Tenzin Youdon <94886097+Tech-lo@users.noreply.github.com>
Date: Thu, 12 Feb 2026 16:17:57 +0530
Subject: [PATCH 17/17] Add segment_id to task-related components as per
updated backend (#147)
* Add segment_id to task-related components as per updated backend
* update naming
---
src/components/routes/task/api/taskApi.ts | 2 ++
src/components/routes/task/components/view/TaskForm.tsx | 9 +++++++--
.../ui/molecules/content-sub/ContentTypeSelector.tsx | 3 ++-
src/components/ui/molecules/subtask-card/SubTaskCard.tsx | 1 +
.../molecules/webuddhist-source/SourceSelectorSheet.tsx | 3 ++-
.../ui/molecules/webuddhist-source/sourceItem.tsx | 3 ++-
6 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/components/routes/task/api/taskApi.ts b/src/components/routes/task/api/taskApi.ts
index d6fa0a7..7c37ee2 100644
--- a/src/components/routes/task/api/taskApi.ts
+++ b/src/components/routes/task/api/taskApi.ts
@@ -46,6 +46,7 @@ export const createSubTasks = async (
duration?: string;
source_text_id?: string | null;
pecha_segment_id?: string | null;
+ segment_id?: string | null;
}[],
) => {
const { data } = await axiosInstance.post(
@@ -71,6 +72,7 @@ export const updateSubTasks = async (
duration?: string;
source_text_id?: string | null;
pecha_segment_id?: string | null;
+ segment_id?: string | null;
}[],
) => {
await axiosInstance.put(
diff --git a/src/components/routes/task/components/view/TaskForm.tsx b/src/components/routes/task/components/view/TaskForm.tsx
index d47f6bc..51575c0 100644
--- a/src/components/routes/task/components/view/TaskForm.tsx
+++ b/src/components/routes/task/components/view/TaskForm.tsx
@@ -84,6 +84,7 @@ const TaskForm = ({
...(subTask.content_type === "SOURCE_REFERENCE" && {
source_text_id: subTask.source_text_id || null,
pecha_segment_id: subTask.pecha_segment_id || null,
+ segment_id: subTask.segment_id || null,
}),
}));
await createSubTasks(taskResponse.id, subTasksPayload);
@@ -116,6 +117,7 @@ const TaskForm = ({
...(subTask.content_type === "SOURCE_REFERENCE" && {
source_text_id: subTask.source_text_id || null,
pecha_segment_id: subTask.pecha_segment_id || null,
+ segment_id: subTask.segment_id || null,
}),
}));
await updateSubTasks(editingTask.id, subTasksPayload);
@@ -192,6 +194,7 @@ const TaskForm = ({
content: data.content,
source_text_id: data.source_text_id || null,
pecha_segment_id: data.pecha_segment_id || null,
+ segment_id: data.segment_id || null,
};
default:
return {
@@ -207,8 +210,9 @@ const TaskForm = ({
interface SourceData {
content: string;
- segment_id: string;
+ pecha_segment_id: string;
text_id: string;
+ segment_id: string;
}
const handleAddSubTask = (content_type: any, sourceData?: SourceData) => {
@@ -251,7 +255,8 @@ const TaskForm = ({
content_type: "SOURCE_REFERENCE",
content: sourceData?.content || "",
source_text_id: sourceData?.text_id || null,
- pecha_segment_id: sourceData?.segment_id || null,
+ pecha_segment_id: sourceData?.pecha_segment_id || null,
+ segment_id: sourceData?.segment_id || null,
};
break;
}
diff --git a/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx b/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx
index 3e84d40..12c5493 100644
--- a/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx
+++ b/src/components/ui/molecules/content-sub/ContentTypeSelector.tsx
@@ -8,8 +8,9 @@ import { SourceSelectorSheet } from "../webuddhist-source/SourceSelectorSheet";
interface SourceData {
content: string;
- segment_id: string;
+ pecha_segment_id: string;
text_id: string;
+ segment_id: string;
}
interface ContentTypeSelectorProps {
diff --git a/src/components/ui/molecules/subtask-card/SubTaskCard.tsx b/src/components/ui/molecules/subtask-card/SubTaskCard.tsx
index 646e8ab..92c2b44 100644
--- a/src/components/ui/molecules/subtask-card/SubTaskCard.tsx
+++ b/src/components/ui/molecules/subtask-card/SubTaskCard.tsx
@@ -46,6 +46,7 @@ interface SourceSubTask {
display_order?: number;
source_text_id?: string | null;
pecha_segment_id?: string | null;
+ segment_id?: string | null;
}
export type SubTask =
| VideoSubTask
diff --git a/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx b/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx
index 2e3eaa1..7fe14c6 100644
--- a/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx
+++ b/src/components/ui/molecules/webuddhist-source/SourceSelectorSheet.tsx
@@ -12,8 +12,9 @@ import { LANGUAGE } from "@/lib/constant";
interface SourceData {
content: string;
- segment_id: string;
+ pecha_segment_id: string;
text_id: string;
+ segment_id: string;
}
interface SourceSelectorSheetProps {
diff --git a/src/components/ui/molecules/webuddhist-source/sourceItem.tsx b/src/components/ui/molecules/webuddhist-source/sourceItem.tsx
index 2e3082b..9cc49b6 100644
--- a/src/components/ui/molecules/webuddhist-source/sourceItem.tsx
+++ b/src/components/ui/molecules/webuddhist-source/sourceItem.tsx
@@ -17,8 +17,9 @@ const SourceItem = ({ source, onSegment }: any) => {
onClick={() =>
onSegment?.({
content: segment.content,
- segment_id: segment.pecha_segment_id,
+ pecha_segment_id: segment.pecha_segment_id,
text_id: source.text.text_id,
+ segment_id: segment.segment_id,
})
}
>