fix: disable all console.log
This commit is contained in:
parent
4c74c191cc
commit
4ec966c9eb
|
|
@ -118,7 +118,7 @@ export default function AddExpertForm() {
|
|||
};
|
||||
|
||||
const save = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
|
||||
const dataReq = {
|
||||
firstName: data.name,
|
||||
|
|
@ -244,10 +244,10 @@ export default function AddExpertForm() {
|
|||
};
|
||||
|
||||
const handleRemoveRow = (index: number) => {
|
||||
console.log(index);
|
||||
console.log(placementRows);
|
||||
// console.log(index);
|
||||
// console.log(placementRows);
|
||||
const newPlacements = placementRows.filter((row) => row.index != index);
|
||||
console.log(newPlacements);
|
||||
// console.log(newPlacements);
|
||||
setPlacementRows(newPlacements);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ export default function UpdateExpertForm() {
|
|||
};
|
||||
|
||||
const save = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
|
||||
const dataReq = {
|
||||
id: detail?.id,
|
||||
|
|
@ -245,7 +245,7 @@ export default function UpdateExpertForm() {
|
|||
|
||||
const resExperiences = await getListExperiences();
|
||||
setUserExperiences(resExperiences?.data?.data);
|
||||
console.log("experience", resExperiences?.data?.data);
|
||||
// console.log("experience", resExperiences?.data?.data);
|
||||
|
||||
const resUserLevels = await AdministrationLevelList();
|
||||
const data = resUserLevels?.data?.data;
|
||||
|
|
@ -288,10 +288,10 @@ export default function UpdateExpertForm() {
|
|||
};
|
||||
|
||||
const handleRemoveRow = (index: number) => {
|
||||
console.log(index);
|
||||
console.log(placementRows);
|
||||
// console.log(index);
|
||||
// console.log(placementRows);
|
||||
const newPlacements = placementRows.filter((row) => row.index != index);
|
||||
console.log(newPlacements);
|
||||
// console.log(newPlacements);
|
||||
setPlacementRows(newPlacements);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ const AccountListTable = () => {
|
|||
temp = temp.filter((a) => a !== id);
|
||||
}
|
||||
setFiltered(temp);
|
||||
console.log("sss", temp);
|
||||
// console.log("sss", temp);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export default function CreateAccountForBroadcast() {
|
|||
emailAddress: data.email,
|
||||
whatsappNumber: data.whatsapp,
|
||||
};
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
|
||||
const response = await saveMediaBlastAccount(reqData);
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export default function EditAccountForBroadcast() {
|
|||
async function getDetailData() {
|
||||
const response = await getMediaBlastAccount(String(id));
|
||||
const details = response?.data?.data;
|
||||
console.log("new", details);
|
||||
// console.log("new", details);
|
||||
form.setValue("name", details.accountName);
|
||||
form.setValue("email", details?.emailAddress);
|
||||
form.setValue("whatsapp", details?.whatsappNumber);
|
||||
|
|
@ -120,7 +120,7 @@ export default function EditAccountForBroadcast() {
|
|||
emailAddress: data.email,
|
||||
whatsappNumber: data.whatsapp,
|
||||
};
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
|
||||
const response = await saveMediaBlastAccount(reqData);
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ const CampaignListTable = () => {
|
|||
item.no = (page - 1) * 10 + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ export default function BroadcastCampaignDetail({
|
|||
|
||||
async function getListPaginationData() {
|
||||
loading();
|
||||
console.log("Type : ", typeFilter);
|
||||
console.log("Date : ", startDateString, endDateString);
|
||||
// console.log("Type : ", typeFilter);
|
||||
// console.log("Date : ", startDateString, endDateString);
|
||||
|
||||
try {
|
||||
const res = await getMediaBlastBroadcastList(
|
||||
|
|
@ -156,7 +156,7 @@ export default function BroadcastCampaignDetail({
|
|||
]);
|
||||
|
||||
function setupData(rawData: PaginatedResponse) {
|
||||
console.log("raw", rawData);
|
||||
// console.log("raw", rawData);
|
||||
if (rawData !== undefined) {
|
||||
const dataContent = rawData?.content;
|
||||
const data: CampaignData[] = [];
|
||||
|
|
@ -255,7 +255,7 @@ export default function BroadcastCampaignDetail({
|
|||
setEndDateString(getOnlyDate(endDate));
|
||||
}
|
||||
}
|
||||
console.log("date range", dateRange);
|
||||
// console.log("date range", dateRange);
|
||||
initState();
|
||||
}, [calenderState, startDate, endDate]);
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ const BroadcastEmailTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ const BroadcastWhatsAppTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ export default function EditUserForm() {
|
|||
const response = await getUserById(String(id));
|
||||
const res = response?.data?.data;
|
||||
close();
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
form.setValue("fullname", res?.fullname);
|
||||
form.setValue("username", res?.username);
|
||||
form.setValue("phoneNumber", res?.phoneNumber);
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ export default function EditUserForm() {
|
|||
const response = await getUserById(String(id));
|
||||
const res = response?.data?.data;
|
||||
close();
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
form.setValue("fullname", res?.fullname);
|
||||
form.setValue("username", res?.username);
|
||||
form.setValue("phoneNumber", res?.phoneNumber);
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ export default function DetailUserForm() {
|
|||
const response = await getUserById(String(id));
|
||||
const res = response?.data?.data;
|
||||
close();
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
if (Number(res.roleId) > 4) {
|
||||
form.setValue("fullname", res?.fullname);
|
||||
form.setValue("username", res?.username);
|
||||
|
|
@ -215,7 +215,7 @@ export default function DetailUserForm() {
|
|||
form.setValue("level", String(res?.userLevelId));
|
||||
} else {
|
||||
initFetch();
|
||||
console.log("sadad", res?.role?.code);
|
||||
// console.log("sadad", res?.role?.code);
|
||||
form.setValue("fullname", res?.fullname);
|
||||
form.setValue("username", res?.username);
|
||||
form.setValue("phoneNumber", res?.phoneNumber);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ export default function EditUserForm() {
|
|||
const response = await getUserById(String(id));
|
||||
const res = response?.data?.data;
|
||||
close();
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
if (Number(res.roleId) > 4) {
|
||||
form.setValue("fullname", res?.fullname);
|
||||
form.setValue("username", res?.username);
|
||||
|
|
@ -221,7 +221,7 @@ export default function EditUserForm() {
|
|||
form.setValue("level", String(res?.userLevelId));
|
||||
} else {
|
||||
initFetch();
|
||||
console.log("sadad", res?.role?.code);
|
||||
// console.log("sadad", res?.role?.code);
|
||||
form.setValue("fullname", res?.fullname);
|
||||
form.setValue("username", res?.username);
|
||||
form.setValue("phoneNumber", res?.phoneNumber);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default function TrackingMediaModal(props: { triggerFetch: () => void })
|
|||
}
|
||||
|
||||
if (/\s/.test(value)) {
|
||||
console.log("Terdapat spasi dalam input");
|
||||
// console.log("Terdapat spasi dalam input");
|
||||
fecthAll();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,11 +161,11 @@ const NewsTable = () => {
|
|||
setCategoryFilter(
|
||||
categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
);
|
||||
console.log(
|
||||
"Kategori",
|
||||
categorie,
|
||||
categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
);
|
||||
// console.log(
|
||||
// "Kategori",
|
||||
// categorie,
|
||||
// categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
// );
|
||||
}
|
||||
}, [categorie]);
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ const NewsTable = () => {
|
|||
} else {
|
||||
filter.splice(categoryFilter.indexOf(id), 1);
|
||||
}
|
||||
console.log("checkbox filter", filter);
|
||||
// console.log("checkbox filter", filter);
|
||||
setCategoryFilter(filter);
|
||||
router.push(`?category=${filter.join("&")}`);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -179,11 +179,11 @@ const ResultTable = () => {
|
|||
setCategoryFilter(
|
||||
categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
);
|
||||
console.log(
|
||||
"Kategori",
|
||||
categorie,
|
||||
categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
);
|
||||
// console.log(
|
||||
// "Kategori",
|
||||
// categorie,
|
||||
// categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
// );
|
||||
}
|
||||
}, [categorie]);
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ const ResultTable = () => {
|
|||
} else {
|
||||
filter.splice(categoryFilter.indexOf(id), 1);
|
||||
}
|
||||
console.log("checkbox filter", filter);
|
||||
// console.log("checkbox filter", filter);
|
||||
setCategoryFilter(filter);
|
||||
router.push(`?category=${filter.join("&")}`);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -151,11 +151,11 @@ const NewsTable = () => {
|
|||
setCategoryFilter(
|
||||
categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
);
|
||||
console.log(
|
||||
"Kategori",
|
||||
categorie,
|
||||
categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
);
|
||||
// console.log(
|
||||
// "Kategori",
|
||||
// categorie,
|
||||
// categorie?.split("&")?.length > 1 ? categorie?.split("&") : [categorie]
|
||||
// );
|
||||
}
|
||||
}, [categorie]);
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ const NewsTable = () => {
|
|||
} else {
|
||||
filter.splice(categoryFilter.indexOf(id), 1);
|
||||
}
|
||||
console.log("checkbox filter", filter);
|
||||
// console.log("checkbox filter", filter);
|
||||
setCategoryFilter(filter);
|
||||
router.push(`?category=${filter.join("&")}`);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ const BannerListTable = () => {
|
|||
|
||||
const response = await listBanner();
|
||||
const data = response?.data?.data?.content;
|
||||
console.log("banner", data);
|
||||
// console.log("banner", data);
|
||||
setGetData(data);
|
||||
|
||||
close();
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ const ContentListBanner = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setData(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ const columns: ColumnDef<any>[] = [
|
|||
|
||||
const categoryDelete = async (id: number) => {
|
||||
const response = await deleteCategory(id);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
if (response?.error) {
|
||||
error(response.message);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default function StatusToogle(props: {
|
|||
const router = useRouter();
|
||||
const publishCategory = async (id: number, status: string) => {
|
||||
const response = await publishUnpublishCategory(id, status);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
if (response?.error) {
|
||||
error(response.message);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const columns: ColumnDef<any>[] = [
|
|||
|
||||
const faqDelete = async (id: string) => {
|
||||
const response = await deleteDataFAQ(id);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
if (response?.error) {
|
||||
error(response.message);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ const AdminFAQTable = () => {
|
|||
loading();
|
||||
const response = await getListFAQ();
|
||||
const data = response?.data?.data;
|
||||
console.log("respone", response);
|
||||
// console.log("respone", response);
|
||||
data.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * 10 + index + 1;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ const columns: ColumnDef<any>[] = [
|
|||
|
||||
const faqDelete = async (id: string) => {
|
||||
const response = await deleteDataFAQ(id);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
if (response?.error) {
|
||||
error(response.message);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const AdminFeedbackTable = () => {
|
|||
loading();
|
||||
const response = await getListFeedback();
|
||||
const data = response?.data?.data;
|
||||
console.log("respone", response);
|
||||
// console.log("respone", response);
|
||||
data.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * 10 + index + 1;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ const IklanListTable = () => {
|
|||
|
||||
const response = await listBanner();
|
||||
const data = response?.data?.data?.content;
|
||||
console.log("banner", data);
|
||||
// console.log("banner", data);
|
||||
setGetData(data);
|
||||
|
||||
close();
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ const AdvertisementsList = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ const PopUpListTable = () => {
|
|||
|
||||
const response = await getListPopUp();
|
||||
const data = response?.data?.data?.content;
|
||||
console.log("banner", data);
|
||||
// console.log("banner", data);
|
||||
setGetData(data);
|
||||
|
||||
close();
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ const ContentListPopUp = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setData(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export default function DetailSettingTracking(props: {
|
|||
});
|
||||
|
||||
const onSubmit = (values: any) => {
|
||||
console.log("Submitted values:", values);
|
||||
// console.log("Submitted values:", values);
|
||||
setIsOpen(false);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export default function UpdateSettingTracking(props: {
|
|||
});
|
||||
|
||||
const onSubmit = (values: any) => {
|
||||
console.log("Submitted values:", values);
|
||||
// console.log("Submitted values:", values);
|
||||
setIsOpen(false);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ export default function CreateTagModal() {
|
|||
categoryId: Number(data.category),
|
||||
isActive: true,
|
||||
};
|
||||
console.log("reqqq", request);
|
||||
// console.log("reqqq", request);
|
||||
// const response = await postDataFeedback(request);
|
||||
// close();
|
||||
// if (response?.error) {
|
||||
|
|
@ -93,7 +93,7 @@ export default function CreateTagModal() {
|
|||
async function getCategoryParent() {
|
||||
const response = await getCategoriesAll();
|
||||
const res = response?.data?.data.content;
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
var levelsArr: { id: number; label: string; value: string }[] = [];
|
||||
res.forEach((levels: { id: number; name: string }) => {
|
||||
levelsArr.push({
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ export default function EditTagModal(props: {
|
|||
async function getCategoryParent() {
|
||||
const response = await getCategoriesAll();
|
||||
const res = response?.data?.data.content;
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
var levelsArr: { id: number; label: string; value: string }[] = [];
|
||||
res.forEach((levels: { id: number; name: string }) => {
|
||||
levelsArr.push({
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ const SurveyListTable = () => {
|
|||
item.no = (page - 1) * 10 + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
|
|||
const [selectedCategory, setSelectedCategory] = useState<string[]>([]);
|
||||
const [selectedEventDate, setSelectedEventDate] = useState<Date | null>(null);
|
||||
const roleId = Number(getCookiesDecrypt("urie")) || 0;
|
||||
console.log("DUARR", roleId)
|
||||
const userLevelId = Number(getCookiesDecrypt("ulie")) || 0;
|
||||
const [calendarEvents, setCalendarEvents] = useState<CalendarEvent[]>([]);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
|
|
@ -178,7 +177,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
|
|||
},
|
||||
}));
|
||||
|
||||
console.log("Event Data : ", events);
|
||||
// console.log("Event Data : ", events);
|
||||
setCalendarEvents(events);
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
@ -217,7 +216,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
|
|||
|
||||
const filteredEvents = calendarEvents.filter((event) => {
|
||||
if (!selectedCategory.length) return false;
|
||||
console.log("Event category : ", selectedCategory);
|
||||
// console.log("Event category : ", selectedCategory);
|
||||
|
||||
const eventCategories = event.extendedProps.calendar
|
||||
?.split(",")
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ const EventModal = ({
|
|||
endDate: date?.to ? format(date.to, "yyyy-MM-dd") : null,
|
||||
};
|
||||
|
||||
console.log("Submitted Data:", reqData);
|
||||
// console.log("Submitted Data:", reqData);
|
||||
|
||||
const response = await saveAgendaSettings(reqData);
|
||||
if (response?.error) {
|
||||
|
|
@ -431,8 +431,8 @@ const EventModal = ({
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
console.log("Event data:", event);
|
||||
console.log("Selected date:", selectedDate);
|
||||
// console.log("Event data:", event);
|
||||
// console.log("Selected date:", selectedDate);
|
||||
|
||||
if (selectedDate) {
|
||||
setDate({
|
||||
|
|
@ -466,7 +466,7 @@ const EventModal = ({
|
|||
};
|
||||
|
||||
const toggleExpand = (poldaId: any) => {
|
||||
console.log("Toogle : ", expandedPolda);
|
||||
// console.log("Toogle : ", expandedPolda);
|
||||
setExpandedPolda((prev: any) => ({
|
||||
...prev,
|
||||
[poldaId]: !prev[poldaId],
|
||||
|
|
@ -527,11 +527,11 @@ const EventModal = ({
|
|||
fileTypeId: string,
|
||||
duration: string
|
||||
) {
|
||||
console.log(idx, id, file, fileTypeId, duration);
|
||||
// console.log(idx, id, file, fileTypeId, duration);
|
||||
|
||||
const resCsrf = await getCsrfToken();
|
||||
const csrfToken = resCsrf?.data?.token;
|
||||
console.log("CSRF TOKEN : ", csrfToken);
|
||||
// console.log("CSRF TOKEN : ", csrfToken);
|
||||
const headers = {
|
||||
"X-XSRF-TOKEN": csrfToken,
|
||||
};
|
||||
|
|
@ -553,7 +553,7 @@ const EventModal = ({
|
|||
xhr.withCredentials = true;
|
||||
},
|
||||
onError: async (e: any) => {
|
||||
console.log("Error upload :", e);
|
||||
// console.log("Error upload :", e);
|
||||
error(e);
|
||||
},
|
||||
onChunkComplete: (
|
||||
|
|
@ -675,7 +675,7 @@ const EventModal = ({
|
|||
}).then(() => {
|
||||
if (redirect === window.location.pathname) {
|
||||
fetch(redirect, { method: "GET", cache: "reload" }).then(() => {
|
||||
console.log("Data diperbarui.");
|
||||
// console.log("Data diperbarui.");
|
||||
});
|
||||
} else {
|
||||
window.location.href = redirect;
|
||||
|
|
@ -774,7 +774,7 @@ const EventModal = ({
|
|||
defaultMonth={date?.from}
|
||||
selected={date}
|
||||
onSelect={(newDate) => {
|
||||
console.log("Date selected:", newDate);
|
||||
// console.log("Date selected:", newDate);
|
||||
setDate(newDate);
|
||||
if (newDate?.from && newDate?.to) {
|
||||
setIsDatePickerOpen(false);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const CalenderPage = () => {
|
|||
...category,
|
||||
activeClass: "",
|
||||
}));
|
||||
console.log(formattedCategories);
|
||||
// console.log(formattedCategories);
|
||||
setCategories(formattedCategories);
|
||||
}
|
||||
}, []);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export function UnitMapping(props: {
|
|||
async function initState() {
|
||||
const response = await getUserLevelForAssignments();
|
||||
setupUnit(response?.data?.data.list);
|
||||
console.log("list", response?.data?.data.list);
|
||||
// console.log("list", response?.data?.data.list);
|
||||
}
|
||||
|
||||
initState();
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ const BlogTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ const TableTeks = () => {
|
|||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ const useTableColumns = () => {
|
|||
|
||||
const handleClick = (e: React.MouseEvent) => {
|
||||
if (e.ctrlKey) {
|
||||
console.log("Ctrl + Click detected");
|
||||
// console.log("Ctrl + Click detected");
|
||||
}
|
||||
// Paksa buka menu meskipun ctrl ditekan
|
||||
setOpen(true);
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ const TableSPIT = () => {
|
|||
React.useEffect(() => {
|
||||
fetchData();
|
||||
getCategories();
|
||||
console.log("TRIGGERRRR");
|
||||
}, [statusFilter, page, showData, search, dateFilter]);
|
||||
|
||||
async function getCategories() {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ const useTableColumns = () => {
|
|||
header: "Status",
|
||||
cell: ({ row }) => {
|
||||
const isActive = row.getValue<boolean>("isActive");
|
||||
console.log("isActive value:", isActive); // TypeScript type is inferred correctly
|
||||
return (
|
||||
<div>
|
||||
{isActive ? (
|
||||
|
|
|
|||
|
|
@ -121,9 +121,6 @@ const MediahubTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ const useTableColumns = () => {
|
|||
header: "Status",
|
||||
cell: ({ row }) => {
|
||||
const isActive = row.getValue<boolean>("isActive");
|
||||
console.log("isActive value:", isActive); // TypeScript type is inferred correctly
|
||||
return (
|
||||
<div>
|
||||
{isActive ? (
|
||||
|
|
|
|||
|
|
@ -121,9 +121,6 @@ const MedsosTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
|
|
|
|||
|
|
@ -161,9 +161,6 @@ const ReportTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
|
|
|
|||
|
|
@ -130,9 +130,6 @@ const CalendarPolriTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ const useTableColumns = () => {
|
|||
accessorKey: "time",
|
||||
header: t("time", { defaultValue: "Time" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
const { startTime, endTime } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
@ -113,7 +112,6 @@ const useTableColumns = () => {
|
|||
accessorKey: "speaker",
|
||||
header: t("speaker", { defaultValue: "Speaker" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
const { speakerTitle, speakerName } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
|
|||
|
|
@ -114,9 +114,6 @@ const EventTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
|
|||
accessorKey: "time",
|
||||
header: t("time", { defaultValue: "Time" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
// console.log("Row Original Data:", row.original);
|
||||
const { startTime, endTime } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
@ -117,7 +117,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
|
|||
accessorKey: "speaker",
|
||||
header: t("speaker", { defaultValue: "Speaker" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
// console.log("Row Original Data:", row.original);
|
||||
const { speakerTitle, speakerName } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ const LiveReportTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const useTableColumns = () => {
|
|||
accessorKey: "time",
|
||||
header: t("time", { defaultValue: "Time" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
// console.log("Row Original Data:", row.original);
|
||||
const { startTime, endTime } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
@ -113,7 +113,7 @@ const useTableColumns = () => {
|
|||
accessorKey: "speaker",
|
||||
header: t("speaker", { defaultValue: "Speaker" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
// console.log("Row Original Data:", row.original);
|
||||
const { speakerTitle, speakerName } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ const PressConferenceTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const useTableColumns = () => {
|
|||
accessorKey: "time",
|
||||
header: t("time", { defaultValue: "Time" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
// console.log("Row Original Data:", row.original);
|
||||
const { startTime, endTime } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
@ -113,7 +113,7 @@ const useTableColumns = () => {
|
|||
accessorKey: "speaker",
|
||||
header: t("speaker", { defaultValue: "Speaker" }),
|
||||
cell: ({ row }: { row: { original: any } }) => {
|
||||
console.log("Row Original Data:", row.original);
|
||||
// console.log("Row Original Data:", row.original);
|
||||
const { speakerTitle, speakerName } = row.original;
|
||||
return (
|
||||
<span className="whitespace-nowrap">
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ const PressReleaseTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ const TaskTaTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ const TaskTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export default function UserFeedback() {
|
|||
}, []);
|
||||
async function initState() {
|
||||
const response = await getUserFeedbacks();
|
||||
console.log("ssss", response?.data?.data);
|
||||
// console.log("ssss", response?.data?.data);
|
||||
setListData(response?.data?.data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ const MediaTrackingTable = () => {
|
|||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", data);
|
||||
// console.log("contentData : ", data);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -113,13 +113,12 @@ const TaskPlanMediahubTable = (props: {
|
|||
// try {
|
||||
// const res = await ticketingPagination("", limit, page - 1);
|
||||
// const data = res?.data?.data;
|
||||
console.log("datgaa", data);
|
||||
const contentData = data;
|
||||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
// setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -153,8 +153,6 @@ export default function DetailDaily() {
|
|||
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("data");
|
||||
console.log("Data :", data);
|
||||
form.setValue("title", data.title);
|
||||
form.setValue("detail", data.description);
|
||||
form.setValue("date", new Date(data.date));
|
||||
|
|
@ -205,7 +203,7 @@ export default function DetailDaily() {
|
|||
const editor = useRef(null);
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
if (form.getValues("detail") == "") {
|
||||
form.setError("detail", {
|
||||
type: "manual",
|
||||
|
|
@ -234,7 +232,7 @@ export default function DetailDaily() {
|
|||
.filter((key) => selected[key])
|
||||
.join(", ");
|
||||
};
|
||||
console.log("data", data, selected);
|
||||
// console.log("data", data, selected);
|
||||
loading();
|
||||
|
||||
const reqData = {
|
||||
|
|
@ -258,7 +256,7 @@ export default function DetailDaily() {
|
|||
assignmentMainTypeId: 1,
|
||||
};
|
||||
|
||||
console.log("req =>", reqData);
|
||||
// console.log("req =>", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -152,8 +152,6 @@ export default function EditDaily() {
|
|||
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("data");
|
||||
console.log("Data :", data);
|
||||
form.setValue("title", data.title);
|
||||
form.setValue("detail", data.description);
|
||||
form.setValue("date", new Date(data.date));
|
||||
|
|
@ -218,7 +216,7 @@ export default function EditDaily() {
|
|||
const editor = useRef(null);
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
if (form.getValues("detail") == "") {
|
||||
form.setError("detail", {
|
||||
type: "manual",
|
||||
|
|
@ -247,7 +245,7 @@ export default function EditDaily() {
|
|||
.filter((key) => selected[key])
|
||||
.join(", ");
|
||||
};
|
||||
console.log("data", data, selected);
|
||||
// console.log("data", data, selected);
|
||||
loading();
|
||||
|
||||
const reqData = {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ export default function CreateDaily() {
|
|||
const editor = useRef(null);
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
if (form.getValues("detail") == "") {
|
||||
form.setError("detail", {
|
||||
type: "manual",
|
||||
|
|
@ -195,7 +195,7 @@ export default function CreateDaily() {
|
|||
.filter((key) => selected[key])
|
||||
.join(", ");
|
||||
};
|
||||
console.log("data", data, selected);
|
||||
// console.log("data", data, selected);
|
||||
loading();
|
||||
|
||||
const reqData = {
|
||||
|
|
@ -219,7 +219,7 @@ export default function CreateDaily() {
|
|||
assignmentMainTypeId: 1,
|
||||
};
|
||||
|
||||
console.log("req =>", reqData);
|
||||
// console.log("req =>", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -76,11 +76,9 @@ export default function DetailMonthly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("detail", data.description);
|
||||
const date = parseDate(data.date);
|
||||
console.log("date", date);
|
||||
form.setValue(
|
||||
"month",
|
||||
new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
|
|
@ -127,7 +125,7 @@ export default function DetailMonthly() {
|
|||
).getFullYear()}`,
|
||||
status: "Open",
|
||||
};
|
||||
console.log("req", reqData, data.month);
|
||||
// console.log("req", reqData, data.month);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -154,7 +152,7 @@ export default function DetailMonthly() {
|
|||
selectedDate.getMonth(),
|
||||
1
|
||||
);
|
||||
console.log("newDate", newDate, selectedDate);
|
||||
// console.log("newDate", newDate, selectedDate);
|
||||
form.setValue("month", newDate);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -77,11 +77,9 @@ export default function EditMonthly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("detail", data.description);
|
||||
const date = parseDate(data.date);
|
||||
console.log("date", date);
|
||||
form.setValue(
|
||||
"month",
|
||||
new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
|
|
@ -129,7 +127,7 @@ export default function EditMonthly() {
|
|||
date: `${month.toString().padStart(2, "0")}/${year}`,
|
||||
status: "Open",
|
||||
};
|
||||
console.log("req", reqData, data.month);
|
||||
// console.log("req", reqData, data.month);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -156,7 +154,7 @@ export default function EditMonthly() {
|
|||
selectedDate.getMonth(),
|
||||
1
|
||||
);
|
||||
console.log("newDate", newDate, selectedDate);
|
||||
// console.log("newDate", newDate, selectedDate);
|
||||
form.setValue("month", newDate);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export default function CreateMonthly() {
|
|||
date: `${month.toString().padStart(2, "0")}/${year}`,
|
||||
status: "Open",
|
||||
};
|
||||
console.log("req", reqData, data.month);
|
||||
// console.log("req", reqData, data.month);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export default function DetailWeekly() {
|
|||
status: "Open",
|
||||
parentId: parentId,
|
||||
};
|
||||
console.log("req", reqData);
|
||||
// console.log("req", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -147,7 +147,7 @@ export default function DetailWeekly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("week", {
|
||||
from: new Date(data?.startDate),
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export default function EditWeekly() {
|
|||
status: "Open",
|
||||
parentId: parentId,
|
||||
};
|
||||
console.log("req", reqData);
|
||||
// console.log("req", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -146,7 +146,7 @@ export default function EditWeekly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("week", {
|
||||
from: new Date(data?.startDate),
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export default function CreateMonthly() {
|
|||
status: "Open",
|
||||
parentId: Number(data.parentId),
|
||||
};
|
||||
console.log("req", reqData);
|
||||
// console.log("req", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default function DetailTaskPlanMediahub() {
|
|||
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
setPlanningData(data);
|
||||
setAssignedTopLevel(data?.assignedToTopLevel);
|
||||
setArrayDestination(data?.assignedToLevel);
|
||||
|
|
@ -112,7 +112,7 @@ export default function DetailTaskPlanMediahub() {
|
|||
label: option.title,
|
||||
value: option.id,
|
||||
}));
|
||||
console.log("res", optionArr);
|
||||
// console.log("res", optionArr);
|
||||
|
||||
setWeeklyList(optionArr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,13 +113,13 @@ const TaskPlanMediahubTable = (props: {
|
|||
// try {
|
||||
// const res = await ticketingPagination("", limit, page - 1);
|
||||
// const data = res?.data?.data;
|
||||
console.log("datgaa", data);
|
||||
// console.log("datgaa", data);
|
||||
const contentData = data;
|
||||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
// setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -153,8 +153,6 @@ export default function DetailDaily() {
|
|||
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("data");
|
||||
console.log("Data :", data);
|
||||
form.setValue("title", data.title);
|
||||
form.setValue("detail", data.description);
|
||||
form.setValue("date", new Date(data.date));
|
||||
|
|
@ -205,7 +203,7 @@ export default function DetailDaily() {
|
|||
const editor = useRef(null);
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
if (form.getValues("detail") == "") {
|
||||
form.setError("detail", {
|
||||
type: "manual",
|
||||
|
|
@ -234,7 +232,7 @@ export default function DetailDaily() {
|
|||
.filter((key) => selected[key])
|
||||
.join(", ");
|
||||
};
|
||||
console.log("data", data, selected);
|
||||
// console.log("data", data, selected);
|
||||
loading();
|
||||
|
||||
const reqData = {
|
||||
|
|
@ -258,7 +256,7 @@ export default function DetailDaily() {
|
|||
assignmentMainTypeId: 1,
|
||||
};
|
||||
|
||||
console.log("req =>", reqData);
|
||||
// console.log("req =>", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -152,8 +152,6 @@ export default function EditDaily() {
|
|||
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("data");
|
||||
console.log("Data :", data);
|
||||
form.setValue("title", data.title);
|
||||
form.setValue("detail", data.description);
|
||||
form.setValue("date", new Date(data.date));
|
||||
|
|
@ -218,7 +216,7 @@ export default function EditDaily() {
|
|||
const editor = useRef(null);
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
|
||||
console.log("data", data);
|
||||
// console.log("data", data);
|
||||
if (form.getValues("detail") == "") {
|
||||
form.setError("detail", {
|
||||
type: "manual",
|
||||
|
|
@ -247,7 +245,7 @@ export default function EditDaily() {
|
|||
.filter((key) => selected[key])
|
||||
.join(", ");
|
||||
};
|
||||
console.log("data", data, selected);
|
||||
// console.log("data", data, selected);
|
||||
loading();
|
||||
|
||||
const reqData = {
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ export default function CreateDaily() {
|
|||
assignmentMainTypeId: 2,
|
||||
};
|
||||
|
||||
console.log("req =>", reqData);
|
||||
// console.log("req =>", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ export default function DetailMonthly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("detail", data.description);
|
||||
const date = parseDate(data.date);
|
||||
console.log("date", date);
|
||||
// console.log("date", date);
|
||||
form.setValue(
|
||||
"month",
|
||||
new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
|
|
@ -127,7 +127,7 @@ export default function DetailMonthly() {
|
|||
date: `${month.toString().padStart(2, "0")}/${year}`,
|
||||
status: "Open",
|
||||
};
|
||||
console.log("req", reqData, data.month);
|
||||
// console.log("req", reqData, data.month);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -154,7 +154,7 @@ export default function DetailMonthly() {
|
|||
selectedDate.getMonth(),
|
||||
1
|
||||
);
|
||||
console.log("newDate", newDate, selectedDate);
|
||||
// console.log("newDate", newDate, selectedDate);
|
||||
form.setValue("month", newDate);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ export default function EditMonthly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("detail", data.description);
|
||||
const date = parseDate(data.date);
|
||||
console.log("date", date);
|
||||
// console.log("date", date);
|
||||
form.setValue(
|
||||
"month",
|
||||
new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
|
|
@ -128,7 +128,7 @@ export default function EditMonthly() {
|
|||
date: `${month.toString().padStart(2, "0")}/${year}`,
|
||||
status: "Open",
|
||||
};
|
||||
console.log("req", reqData, data.month);
|
||||
// console.log("req", reqData, data.month);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -155,7 +155,7 @@ export default function EditMonthly() {
|
|||
selectedDate.getMonth(),
|
||||
1
|
||||
);
|
||||
console.log("newDate", newDate, selectedDate);
|
||||
// console.log("newDate", newDate, selectedDate);
|
||||
form.setValue("month", newDate);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default function CreateMonthly() {
|
|||
date: `${month.toString().padStart(2, "0")}/${year}`,
|
||||
status: "Open",
|
||||
};
|
||||
console.log("req", reqData, data.month);
|
||||
// console.log("req", reqData, data.month);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export default function DetailWeekly() {
|
|||
status: "Open",
|
||||
parentId: parentId,
|
||||
};
|
||||
console.log("req", reqData);
|
||||
// console.log("req", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -147,7 +147,7 @@ export default function DetailWeekly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("week", {
|
||||
from: new Date(data?.startDate),
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export default function EditWeekly() {
|
|||
status: "Open",
|
||||
parentId: parentId,
|
||||
};
|
||||
console.log("req", reqData);
|
||||
// console.log("req", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -145,7 +145,7 @@ export default function EditWeekly() {
|
|||
close();
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
form.setValue("title", data?.title);
|
||||
form.setValue("week", {
|
||||
from: new Date(data?.startDate),
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ export default function CreateMonthly() {
|
|||
status: "Open",
|
||||
parentId: Number(data.parentId),
|
||||
};
|
||||
console.log("req", reqData);
|
||||
// console.log("req", reqData);
|
||||
const response = await savePlanning(reqData);
|
||||
close();
|
||||
if (response?.error) {
|
||||
|
|
@ -149,7 +149,7 @@ export default function CreateMonthly() {
|
|||
label: option.title,
|
||||
value: String(option.id),
|
||||
}));
|
||||
console.log("ssss", optionArr);
|
||||
// console.log("ssss", optionArr);
|
||||
setMonthlyList(optionArr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default function DetailTaskPlanMediahub() {
|
|||
|
||||
if (res?.data?.data != undefined) {
|
||||
const data = res?.data?.data;
|
||||
console.log("Data :", data);
|
||||
// console.log("Data :", data);
|
||||
setPlanningData(data);
|
||||
setAssignedTopLevel(data?.assignedToTopLevel);
|
||||
setArrayDestination(data?.assignedToLevel);
|
||||
|
|
@ -113,7 +113,7 @@ export default function DetailTaskPlanMediahub() {
|
|||
label: option.title,
|
||||
value: option.id,
|
||||
}));
|
||||
console.log("res", optionArr);
|
||||
// console.log("res", optionArr);
|
||||
|
||||
setWeeklyList(optionArr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ const ContentTable = () => {
|
|||
item.no = (page - 1) * limit + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ const CollaborationTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ export default function CollaborationPage() {
|
|||
const res = await getTicketCollaborationTeams(String(id));
|
||||
|
||||
if (res?.data !== null) {
|
||||
console.log("response teams:", res);
|
||||
// console.log("response teams:", res);
|
||||
|
||||
setDetailTickets(res?.data?.data?.tickets);
|
||||
setTeams(res?.data?.data?.userTeam);
|
||||
console.log("userteam", res?.data?.data?.userTeam);
|
||||
// console.log("userteam", res?.data?.data?.userTeam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ export default function CollaborationPage() {
|
|||
if (id != undefined) {
|
||||
loading();
|
||||
const responseGet = await getCollabDiscussion(String(id));
|
||||
console.log("get res data", responseGet?.data?.data);
|
||||
// console.log("get res data", responseGet?.data?.data);
|
||||
close();
|
||||
setListDiscussion(responseGet?.data?.data);
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ export default function CollaborationPage() {
|
|||
async function deleteDataSuggestion(dataId: string | number) {
|
||||
loading();
|
||||
const response = await deleteCollabDiscussion(dataId);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
toast({
|
||||
title: "Sukses hapus",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -155,12 +155,12 @@ const EscalationTable = () => {
|
|||
contentData.forEach((item: any, index: number) => {
|
||||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
setTotalPage(data?.totalPages);
|
||||
} catch (error) {
|
||||
console.error("Error fetching tasks:", error);
|
||||
// console.error("Error fetching tasks:", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ const InternalTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ const TaskTable = () => {
|
|||
item.no = (page - 1) * Number(showData) + index + 1;
|
||||
});
|
||||
|
||||
console.log("contentData : ", contentData);
|
||||
// console.log("contentData : ", contentData);
|
||||
|
||||
setDataTable(contentData);
|
||||
setTotalData(data?.totalElements);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const VideoSliderPage = () => {
|
|||
contentTypeId: "2",
|
||||
};
|
||||
const response = await getListContent(request);
|
||||
console.log("category", response);
|
||||
// console.log("category", response);
|
||||
setNewContent(response?.data?.data?.content);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const AudioSliderPage = () => {
|
|||
contentTypeId: "4",
|
||||
};
|
||||
const response = await getListContent(request);
|
||||
console.log("category", response);
|
||||
// console.log("category", response);
|
||||
setNewContent(response?.data?.data?.content);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const ImageSliderPage = () => {
|
|||
contentTypeId: "3",
|
||||
};
|
||||
const response = await getListContent(request);
|
||||
console.log("category", response);
|
||||
// console.log("category", response);
|
||||
setNewContent(response?.data?.data?.content);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const TeksSliderPage = () => {
|
|||
contentTypeId: "1",
|
||||
};
|
||||
const response = await getListContent(request);
|
||||
console.log("category", response);
|
||||
// console.log("category", response);
|
||||
setNewContent(response?.data?.data?.content);
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const AudioAll = () => {
|
|||
|
||||
const initFetch = async () => {
|
||||
const response = await listCuratedContent(search, limit, page - 1, 4, "1");
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const data = response?.data?.data;
|
||||
const contentData = data?.content;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const AudioSliderPage = () => {
|
|||
|
||||
const initFetch = async () => {
|
||||
const response = await listCuratedContent(search, limit, page - 1, 4, "1");
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const data = response?.data?.data;
|
||||
const contentData = data?.content;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const initialComments = [
|
|||
export default function DetailAudio() {
|
||||
const MySwal = withReactContent(Swal);
|
||||
const { id } = useParams() as { id: string };
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
const editor = useRef(null);
|
||||
type DetailSchema = z.infer<typeof detailSchema>;
|
||||
|
||||
|
|
@ -221,8 +221,8 @@ export default function DetailAudio() {
|
|||
async function initState() {
|
||||
// loading();
|
||||
const response = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("data", response?.data?.data);
|
||||
console.log("userLvl", userLevelNumber);
|
||||
// console.log("data", response?.data?.data);
|
||||
// console.log("userLvl", userLevelNumber);
|
||||
setListData(response?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ export default function DetailAudio() {
|
|||
};
|
||||
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log("Komentar terkirim:", response);
|
||||
// console.log("Komentar terkirim:", response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
|
@ -250,7 +250,7 @@ export default function DetailAudio() {
|
|||
console.error("Error posting comment:", error);
|
||||
}
|
||||
} else {
|
||||
console.log("Pesan atau file ID tidak valid.");
|
||||
// console.log("Pesan atau file ID tidak valid.");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -267,12 +267,12 @@ export default function DetailAudio() {
|
|||
parentId,
|
||||
};
|
||||
|
||||
console.log("Sending reply:", data);
|
||||
// console.log("Sending reply:", data);
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("Updated comments:", responseGet?.data?.data);
|
||||
// console.log("Updated comments:", responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
||||
inputElement.value = "";
|
||||
|
|
@ -284,16 +284,16 @@ export default function DetailAudio() {
|
|||
async function deleteDataSuggestion(dataId: any) {
|
||||
loading();
|
||||
const response = await deleteMediaCurationMessage(dataId);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log(responseGet?.data?.data);
|
||||
// console.log(responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
||||
const deleteData = (dataId: any) => {
|
||||
deleteDataSuggestion(dataId);
|
||||
console.log(dataId);
|
||||
// console.log(dataId);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -331,7 +331,7 @@ export default function DetailAudio() {
|
|||
setSelectedFileId(fileId);
|
||||
try {
|
||||
const response = await getMediaCurationMessage(fileId);
|
||||
console.log("Data komentar:", response?.data?.data);
|
||||
// console.log("Data komentar:", response?.data?.data);
|
||||
setListData(response?.data?.data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching comments:", error);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const TeksAll = () => {
|
|||
|
||||
const initFetch = async () => {
|
||||
const response = await listCuratedContent(search, limit, page - 1, 3, "1");
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const data = response?.data?.data;
|
||||
const contentData = data?.content;
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ const initialComments = [
|
|||
export default function DetailDocument() {
|
||||
const MySwal = withReactContent(Swal);
|
||||
const { id } = useParams() as { id: string };
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
const editor = useRef(null);
|
||||
type DetailSchema = z.infer<typeof detailSchema>;
|
||||
const userLevelNumber = getCookiesDecrypt("ulne");
|
||||
|
|
@ -211,8 +211,8 @@ export default function DetailDocument() {
|
|||
async function initState() {
|
||||
// loading();
|
||||
const response = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("data", response?.data?.data);
|
||||
console.log("userLvl", userLevelNumber);
|
||||
// console.log("data", response?.data?.data);
|
||||
// console.log("userLvl", userLevelNumber);
|
||||
setListData(response?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ export default function DetailDocument() {
|
|||
};
|
||||
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log("Komentar terkirim:", response);
|
||||
// console.log("Komentar terkirim:", response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
|
@ -240,7 +240,7 @@ export default function DetailDocument() {
|
|||
console.error("Error posting comment:", error);
|
||||
}
|
||||
} else {
|
||||
console.log("Pesan atau file ID tidak valid.");
|
||||
// console.log("Pesan atau file ID tidak valid.");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -257,12 +257,12 @@ export default function DetailDocument() {
|
|||
parentId,
|
||||
};
|
||||
|
||||
console.log("Sending reply:", data);
|
||||
// console.log("Sending reply:", data);
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("Updated comments:", responseGet?.data?.data);
|
||||
// console.log("Updated comments:", responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
||||
inputElement.value = "";
|
||||
|
|
@ -274,16 +274,16 @@ export default function DetailDocument() {
|
|||
async function deleteDataSuggestion(dataId: any) {
|
||||
loading();
|
||||
const response = await deleteMediaCurationMessage(dataId);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log(responseGet?.data?.data);
|
||||
// console.log(responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
||||
const deleteData = (dataId: any) => {
|
||||
deleteDataSuggestion(dataId);
|
||||
console.log(dataId);
|
||||
// console.log(dataId);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -313,7 +313,7 @@ export default function DetailDocument() {
|
|||
setSelectedFileId(fileId);
|
||||
try {
|
||||
const response = await getMediaCurationMessage(fileId);
|
||||
console.log("Data komentar:", response?.data?.data);
|
||||
// console.log("Data komentar:", response?.data?.data);
|
||||
setListData(response?.data?.data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching comments:", error);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const TeksSliderPage = () => {
|
|||
|
||||
const initFetch = async () => {
|
||||
const response = await listCuratedContent(search, limit, page - 1, 3, "1");
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const data = response?.data?.data;
|
||||
const contentData = data?.content;
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ export default function DetailAcceptImage() {
|
|||
const MySwal = withReactContent(Swal);
|
||||
const { id } = useParams() as { id: string };
|
||||
const t = useTranslations("LandingPage");
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
const editor = useRef(null);
|
||||
type DetailSchema = z.infer<typeof detailSchema>;
|
||||
const userLevelNumber = getCookiesDecrypt("ulne");
|
||||
|
|
@ -204,8 +204,8 @@ export default function DetailAcceptImage() {
|
|||
async function initState() {
|
||||
// loading();
|
||||
const response = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("data", response?.data?.data);
|
||||
console.log("userLvl", userLevelNumber);
|
||||
// console.log("data", response?.data?.data);
|
||||
// console.log("userLvl", userLevelNumber);
|
||||
setListData(response?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ export default function DetailAcceptImage() {
|
|||
};
|
||||
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log("Komentar terkirim:", response);
|
||||
// console.log("Komentar terkirim:", response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
|
@ -237,7 +237,7 @@ export default function DetailAcceptImage() {
|
|||
console.error("Error posting comment:", error);
|
||||
}
|
||||
} else {
|
||||
console.log("Pesan atau file ID tidak valid.");
|
||||
// console.log("Pesan atau file ID tidak valid.");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -254,12 +254,12 @@ export default function DetailAcceptImage() {
|
|||
parentId,
|
||||
};
|
||||
|
||||
console.log("Sending reply:", data);
|
||||
// console.log("Sending reply:", data);
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("Updated comments:", responseGet?.data?.data);
|
||||
// console.log("Updated comments:", responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
||||
inputElement.value = "";
|
||||
|
|
@ -271,16 +271,16 @@ export default function DetailAcceptImage() {
|
|||
async function deleteDataSuggestion(dataId: any) {
|
||||
loading();
|
||||
const response = await deleteMediaCurationMessage(dataId);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log(responseGet?.data?.data);
|
||||
// console.log(responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
||||
const deleteData = (dataId: any) => {
|
||||
deleteDataSuggestion(dataId);
|
||||
console.log(dataId);
|
||||
// console.log(dataId);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -308,7 +308,7 @@ export default function DetailAcceptImage() {
|
|||
setSelectedFileId(fileId);
|
||||
try {
|
||||
const response = await getMediaCurationMessage(fileId);
|
||||
console.log("Data komentar:", response?.data?.data);
|
||||
// console.log("Data komentar:", response?.data?.data);
|
||||
setListData(response?.data?.data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching comments:", error);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ const initialComments = [
|
|||
export default function DetailImage() {
|
||||
const MySwal = withReactContent(Swal);
|
||||
const { id } = useParams() as { id: string };
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
const editor = useRef(null);
|
||||
type DetailSchema = z.infer<typeof detailSchema>;
|
||||
const userLevelNumber = getCookiesDecrypt("ulne");
|
||||
|
|
@ -197,8 +197,8 @@ export default function DetailImage() {
|
|||
async function initState() {
|
||||
// loading();
|
||||
const response = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("data", response?.data?.data);
|
||||
console.log("userLvl", userLevelNumber);
|
||||
// console.log("data", response?.data?.data);
|
||||
// console.log("userLvl", userLevelNumber);
|
||||
setListData(response?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
|
@ -220,7 +220,7 @@ export default function DetailImage() {
|
|||
};
|
||||
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log("Komentar terkirim:", response);
|
||||
// console.log("Komentar terkirim:", response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
|
@ -230,7 +230,7 @@ export default function DetailImage() {
|
|||
console.error("Error posting comment:", error);
|
||||
}
|
||||
} else {
|
||||
console.log("Pesan atau file ID tidak valid.");
|
||||
// console.log("Pesan atau file ID tidak valid.");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -247,12 +247,12 @@ export default function DetailImage() {
|
|||
parentId,
|
||||
};
|
||||
|
||||
console.log("Sending reply:", data);
|
||||
// console.log("Sending reply:", data);
|
||||
const response = await saveMediaCurationMessage(data);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log("Updated comments:", responseGet?.data?.data);
|
||||
// console.log("Updated comments:", responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
|
||||
inputElement.value = "";
|
||||
|
|
@ -264,16 +264,16 @@ export default function DetailImage() {
|
|||
async function deleteDataSuggestion(dataId: any) {
|
||||
loading();
|
||||
const response = await deleteMediaCurationMessage(dataId);
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
const responseGet = await getMediaCurationMessage(selectedFileId);
|
||||
console.log(responseGet?.data?.data);
|
||||
// console.log(responseGet?.data?.data);
|
||||
setListData(responseGet?.data?.data);
|
||||
close();
|
||||
}
|
||||
|
||||
const deleteData = (dataId: any) => {
|
||||
deleteDataSuggestion(dataId);
|
||||
console.log(dataId);
|
||||
// console.log(dataId);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -301,7 +301,7 @@ export default function DetailImage() {
|
|||
setSelectedFileId(fileId);
|
||||
try {
|
||||
const response = await getMediaCurationMessage(fileId);
|
||||
console.log("Data komentar:", response?.data?.data);
|
||||
// console.log("Data komentar:", response?.data?.data);
|
||||
setListData(response?.data?.data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching comments:", error);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue