diff --git a/app/[locale]/(protected)/admin/add-experts/create/page.tsx b/app/[locale]/(protected)/admin/add-experts/create/page.tsx index 45a635e7..bf451be4 100644 --- a/app/[locale]/(protected)/admin/add-experts/create/page.tsx +++ b/app/[locale]/(protected)/admin/add-experts/create/page.tsx @@ -69,7 +69,7 @@ const FormSchema = z.object({ .refine((val) => !/\s/.test(val), { message: "Username tidak boleh mengandung spasi", }), - // .transform((val) => val.toLowerCase()), + // .transform((val) => val.toLowerCase()), password: z .string({ required_error: "Required" }) @@ -85,6 +85,7 @@ const FormSchema = z.object({ skills: z.string({ required_error: "Required" }), experiences: z.string({ required_error: "Required" }), company: z.string({ required_error: "Required" }), + address: z.string({ required_error: "Required" }), }); // .refine((data) => data.password === data.confirmPassword, { // path: ["confirmPassword"], @@ -116,7 +117,7 @@ export default function AddExpertForm() { const togglePasswordType = () => { setPasswordType((prevType) => - prevType === "password" ? "text" : "password" + prevType === "password" ? "text" : "password", ); }; @@ -155,7 +156,7 @@ export default function AddExpertForm() { username: data.username, email: data.email, password: data.password, - address: "", + address: data.address, roleId: "EXP-ID", phoneNumber: data.phoneNumber, userCompetencyId: data.skills, @@ -264,12 +265,12 @@ export default function AddExpertForm() { const handleSelectionChange = ( index: number, type: "roleId" | "userLevelId", - value: string + value: string, ) => { setPlacementRows((prevRows) => prevRows.map((row) => - row.index === index ? { ...row, [type]: value } : row - ) + row.index === index ? { ...row, [type]: value } : row, + ), ); }; @@ -424,6 +425,24 @@ export default function AddExpertForm() { )} /> + + ( + + Alamat + + + + )} + /> + @@ -472,8 +491,8 @@ export default function AddExpertForm() { passwordStrength === "weak" ? "text-red-500" : passwordStrength === "medium" - ? "text-yellow-600" - : "text-green-600" + ? "text-yellow-600" + : "text-green-600" }`} > {passwordStrength === "weak" && "Weak Password"} diff --git a/app/[locale]/(protected)/contributor/content/image/components/table-image.tsx b/app/[locale]/(protected)/contributor/content/image/components/table-image.tsx index 1e74bd95..57ee8f17 100644 --- a/app/[locale]/(protected)/contributor/content/image/components/table-image.tsx +++ b/app/[locale]/(protected)/contributor/content/image/components/table-image.tsx @@ -53,7 +53,7 @@ const TableImage = () => { const [totalPage, setTotalPage] = React.useState(1); const [sorting, setSorting] = React.useState([]); const [columnFilters, setColumnFilters] = React.useState( - [] + [], ); const [columnVisibility, setColumnVisibility] = React.useState({}); @@ -64,7 +64,7 @@ const TableImage = () => { const [searchTimeout, setSearchTimeout] = React.useState(null); const [categories, setCategories] = React.useState([]); const [selectedCategories, setSelectedCategories] = React.useState( - [] + [], ); const [categoryFilter, setCategoryFilter] = React.useState(""); const [statusFilter, setStatusFilter] = React.useState([]); @@ -170,6 +170,10 @@ const TableImage = () => { } const isForSelf = Number(roleId) === 4; + + const isNeedApproval = statusFilter.includes(1); + const needApprovalFrom = isNeedApproval ? userLevelId : ""; + const res = await listDataImage( parseInt(showData) || 10, page - 1, @@ -177,16 +181,33 @@ const TableImage = () => { !isForSelf, categoryFilter, statusFilter, - statusFilter?.sort().join(",").includes("1") ? userLevelId : "", + needApprovalFrom, filterByCreator, filterBySource, formattedStartDate, formattedEndDate, customSearch ?? search, filterByCreatorGroup, - locale == "en" + locale == "en", ); + // const res = await listDataImage( + // parseInt(showData) || 10, + // page - 1, + // isForSelf, + // !isForSelf, + // categoryFilter, + // statusFilter, + // statusFilter?.sort().join(",").includes("1") ? userLevelId : "", + // filterByCreator, + // filterBySource, + // formattedStartDate, + // formattedEndDate, + // customSearch ?? search, + // filterByCreatorGroup, + // locale == "en" + // ); + const data = res?.data?.data; const contentData = data?.content || []; const newData = contentData.map((item: any, index: number) => ({ @@ -209,7 +230,7 @@ const TableImage = () => { setSelectedCategories((prev) => prev.includes(categoryId) ? prev.filter((id) => id !== categoryId) - : [...prev, categoryId] + : [...prev, categoryId], ); setCategoryFilter((prev) => { @@ -225,7 +246,7 @@ const TableImage = () => { setStatusFilter((prev: any) => prev.includes(value) ? prev.filter((status: any) => status !== value) - : [...prev, value] + : [...prev, value], ); }; @@ -253,14 +274,14 @@ const TableImage = () => { }; const handleSearchFilterByCreator = ( - e: React.ChangeEvent + e: React.ChangeEvent, ) => { setFilterByCreator(e.target.value); fetchData(); }; const handleSearchFilterBySource = ( - e: React.ChangeEvent + e: React.ChangeEvent, ) => { setFilterBySource(e.target.value); fetchData(); @@ -430,10 +451,10 @@ const TableImage = () => { id === 1 ? "Menunggu Review" : id === 2 - ? "Diterima" - : id === 3 - ? "Minta Update" - : "Ditolak"; + ? "Diterima" + : id === 3 + ? "Minta Update" + : "Ditolak"; return (
{ ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ))} diff --git a/app/[locale]/(protected)/contributor/task-ta/components/columns.tsx b/app/[locale]/(protected)/contributor/task-ta/components/columns.tsx index a0ffd900..4e4752a7 100644 --- a/app/[locale]/(protected)/contributor/task-ta/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/task-ta/components/columns.tsx @@ -235,12 +235,35 @@ const useTableColumns = ( {/* VIEW */} - + {/* + + + View + + */} + {/* VIEW */} + View + {roleId === 19 && ( + + + + Upload Tugas + + + )} {/* UPLOAD (MABES → KOOR TAB) */} {activeTab === "mabes-koor" && roleId === 11 && ( diff --git a/app/[locale]/(protected)/contributor/task-ta/components/task-ta-table.tsx b/app/[locale]/(protected)/contributor/task-ta/components/task-ta-table.tsx index 4a5729ad..5f0cd9aa 100644 --- a/app/[locale]/(protected)/contributor/task-ta/components/task-ta-table.tsx +++ b/app/[locale]/(protected)/contributor/task-ta/components/task-ta-table.tsx @@ -60,6 +60,7 @@ export default function TaskTaTable() { const roleId = Number(getCookiesDecrypt("urie")); const userId = Number(getCookiesDecrypt("uie")); const isKoorKuratorRole11 = roleId === 11; + const isRole19 = roleId === 19; const isMabesApprover = userLevelId === MABES_LEVEL_ID && roleId === APPROVER_ROLE_ID; @@ -301,7 +302,7 @@ export default function TaskTaTable() { diff --git a/app/[locale]/(protected)/dashboard/page.tsx b/app/[locale]/(protected)/dashboard/page.tsx index 878846bb..0f4d71f2 100644 --- a/app/[locale]/(protected)/dashboard/page.tsx +++ b/app/[locale]/(protected)/dashboard/page.tsx @@ -63,15 +63,14 @@ const DashboardPage = () => { > {t("indeks", { defaultValue: "Indeks" })} - - - {t("report", { defaultValue: "Report" })} - )} + + {t("report", { defaultValue: "Report" })} + diff --git a/app/[locale]/(public)/contact/page.tsx b/app/[locale]/(public)/contact/page.tsx index 601c7336..5901c289 100644 --- a/app/[locale]/(public)/contact/page.tsx +++ b/app/[locale]/(public)/contact/page.tsx @@ -10,6 +10,7 @@ import { useTranslations } from "next-intl"; import { z } from "zod"; import { zodResolver } from "@hookform/resolvers/zod"; import { useRouter } from "@/i18n/routing"; +import Image from "next/image"; interface IFormInput { name: string; @@ -112,7 +113,7 @@ const ContactForm = () => { {/* Header */}
- contact + contact

{t("contactUs", { defaultValue: "Contact Us" })}

diff --git a/app/[locale]/(public)/feedback/page.tsx b/app/[locale]/(public)/feedback/page.tsx index 12fbdce6..4478c1f1 100644 --- a/app/[locale]/(public)/feedback/page.tsx +++ b/app/[locale]/(public)/feedback/page.tsx @@ -5,6 +5,7 @@ import { error, loading, successCallback } from "@/config/swal"; import { getFeedback, postUserFeedback } from "@/service/landing/landing"; import React, { useEffect, useState } from "react"; import { useTranslations } from "next-intl"; +import Image from "next/image"; interface RatingProps { label: string; @@ -119,7 +120,7 @@ const FeedbackForm: React.FC = () => {
- Feedback + Feedback

{t("userFeedback", { defaultValue: "User Feedback" })}

diff --git a/components/form/task-ta/task-ta-detail-form.tsx b/components/form/task-ta/task-ta-detail-form.tsx index b837ea69..47ec391b 100644 --- a/components/form/task-ta/task-ta-detail-form.tsx +++ b/components/form/task-ta/task-ta-detail-form.tsx @@ -1645,7 +1645,7 @@ export default function FormTaskTaDetail() { variant={"default"} onClick={() => { setIsTableResult(!isTableResult); - if (!isTableResult) fetchAllData(); // Panggil API saat tombol diklik + if (!isTableResult) fetchAllData(); }} > Hasil Upload