This commit is contained in:
Sabda Yagra 2025-10-16 12:41:59 +07:00
commit fdb3080495
14 changed files with 31 additions and 14 deletions

View File

@ -26,6 +26,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
rejectFiles,
submitApproval,
} from "@/service/content/content";
@ -487,7 +488,7 @@ export default function FormAudioDetail() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data.data.content;
setCategories(resCategory);

View File

@ -34,6 +34,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
uploadThumbnail,
} from "@/service/content/content";
import { uploadThumbnailBlog } from "@/service/blog/blog";
@ -465,7 +466,7 @@ export default function FormAudio() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -30,6 +30,7 @@ import {
deleteFile,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
updateFilePlacements,
uploadThumbnail,
} from "@/service/content/content";
@ -305,7 +306,7 @@ export default function FormAudioUpdate() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data.data.content;
setCategories(resCategory);

View File

@ -26,6 +26,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
publishMedia,
rejectFiles,
submitApproval,
@ -879,7 +880,7 @@ export default function FormImageDetail() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -34,6 +34,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
uploadThumbnail,
} from "@/service/content/content";
import { uploadThumbnailBlog } from "@/service/blog/blog";
@ -498,7 +499,7 @@ export default function FormImage() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data.data.content;
setCategories(resCategory);

View File

@ -32,6 +32,7 @@ import {
deleteMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
updateFilePlacements,
uploadThumbnail,
} from "@/service/content/content";
@ -766,7 +767,7 @@ export default function FormImageUpdate() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -54,6 +54,7 @@ import {
detailSPIT,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
} from "@/service/content/content";
import { generateDataRewrite, getDetailArticle } from "@/service/content/ai";
import { getCookiesDecrypt } from "@/lib/utils";
@ -253,7 +254,7 @@ export default function FormConvertSPIT() {
const loadCategories = async () => {
try {
const response = await listEnableCategory("1", true);
const response = await listEnableCategoryNew("1", true);
const categories = response?.data?.data?.content || [];
setCategories(categories);

View File

@ -23,6 +23,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
rejectFiles,
submitApproval,
} from "@/service/content/content";
@ -447,7 +448,7 @@ export default function FormTeksDetail() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -32,6 +32,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
uploadThumbnail,
} from "@/service/content/content";
import { uploadThumbnailBlog } from "@/service/blog/blog";
@ -481,7 +482,7 @@ export default function FormTeks() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -35,6 +35,7 @@ import {
listEnableCategory,
uploadThumbnail,
updateFilePlacements,
listEnableCategoryNew,
} from "@/service/content/content";
import { getUserLevelForAssignments } from "@/service/task";
import { detailMedia } from "@/service/curated-content/curated-content";
@ -327,7 +328,7 @@ export default function FormTeksUpdate() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -27,6 +27,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
rejectFiles,
submitApproval,
} from "@/service/content/content";
@ -450,7 +451,7 @@ export default function FormVideoDetail() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -32,6 +32,7 @@ import {
createMedia,
getTagsBySubCategoryId,
listEnableCategory,
listEnableCategoryNew,
uploadThumbnail,
} from "@/service/content/content";
import { Textarea } from "@/components/ui/textarea";
@ -470,7 +471,7 @@ export default function FormVideo() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -44,6 +44,7 @@ import {
listEnableCategory,
uploadThumbnail,
updateFilePlacements,
listEnableCategoryNew,
} from "@/service/content/content";
import { getUserLevelForAssignments } from "@/service/task";
import { detailMedia } from "@/service/curated-content/curated-content";
@ -340,7 +341,7 @@ export default function FormVideoUpdate() {
const getCategories = async () => {
try {
const category = await listEnableCategory(fileTypeId);
const category = await listEnableCategoryNew(fileTypeId);
const resCategory: Category[] = category?.data?.data?.content;
setCategories(resCategory);

View File

@ -157,7 +157,11 @@ export async function getTagsBySubCategoryId(subCategory: any) {
}
export async function listEnableCategory(type: any, status?: boolean) {
const url = `media/categories/list/publish?enablePage=0&sort=desc&sortBy=id&type=${type}&isInt=true&isPublish=${status || ""}`;
const url = `media/categories/list?enablePage=0&sort=desc&sortBy=id&type=${type}&isInt=true&isPublish=${status || ""}`;
return httpGetInterceptor(url);
}
export async function listEnableCategoryNew(type: any, status?: boolean) {
const url = `media/categories/list/publish?enablePage=0&sort=desc&sortBy=id&type=${type}&isPublish=${status || ""}`;
return httpGetInterceptor(url);
}