From 1f273035d483b336d8774ed2aa2ea009486acca1 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Tue, 29 Apr 2025 11:47:41 +0800 Subject: [PATCH] feat:update --- .../contributor/report/components/columns.tsx | 8 +++++++- app/[locale]/(protected)/dashboard/executive/page.tsx | 9 +-------- components/form/survey/survey-detail.tsx | 1 - components/landing-page/survey.tsx | 1 - components/partials/auth/login-form.tsx | 9 ++++++--- messages/en.json | 2 ++ messages/in.json | 2 ++ 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/[locale]/(protected)/contributor/report/components/columns.tsx b/app/[locale]/(protected)/contributor/report/components/columns.tsx index 8bf9f31e..e244576c 100644 --- a/app/[locale]/(protected)/contributor/report/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/report/components/columns.tsx @@ -49,7 +49,7 @@ const useTableColumns = ({ }, { accessorKey: "createdAt", - header: t("upload-date"), + header: t("generate-date"), cell: ({ row }) => { const createdAt = row.getValue("createdAt") as | string @@ -69,6 +69,12 @@ const useTableColumns = ({ cell: ({ row }) => {row.getValue("version")}, }, + { + accessorKey: "status", + header: t("status"), + cell: ({ row }) => {row.getValue("status")}, + }, + { id: "actions", accessorKey: "action", diff --git a/app/[locale]/(protected)/dashboard/executive/page.tsx b/app/[locale]/(protected)/dashboard/executive/page.tsx index 918c2d0a..b3246212 100644 --- a/app/[locale]/(protected)/dashboard/executive/page.tsx +++ b/app/[locale]/(protected)/dashboard/executive/page.tsx @@ -20,7 +20,6 @@ import { useEffect, useState } from "react"; import Cookies from "js-cookie"; export default function ExecutiveDashboard() { - const [startDate, setStartDate] = useState(new Date()); const [endDate, setEndDate] = useState(new Date()); const [hasMounted, setHasMounted] = useState(false); @@ -153,7 +152,6 @@ export default function ExecutiveDashboard() {

Upload konten hari ini Polda

-
{ticket1 == "" ? ( @@ -186,7 +184,6 @@ export default function ExecutiveDashboard() {

Upload konten hari ini Satker

-
{ticket2 == "" ? ( @@ -219,7 +216,6 @@ export default function ExecutiveDashboard() {

Upload konten hari ini Polres

-
{ticket3 == "" ? ( @@ -245,7 +241,6 @@ export default function ExecutiveDashboard() {

Konten Paling Populer

-
{ticket4 == "" ? ( @@ -268,14 +263,13 @@ export default function ExecutiveDashboard() {
-
+

Heatmap Konten Dengan Interaksi

Heatmap Kategori Dengan Interaksi

-
{ticket5 == "" ? ( @@ -300,7 +294,6 @@ export default function ExecutiveDashboard() {

Emergency Issue

-
diff --git a/components/form/survey/survey-detail.tsx b/components/form/survey/survey-detail.tsx index 5307a17d..61dac0ae 100644 --- a/components/form/survey/survey-detail.tsx +++ b/components/form/survey/survey-detail.tsx @@ -144,7 +144,6 @@ export default function FormSurveyDetailPage() { setDetail(details); - // Set value dari data detail ke form if (details) { setValue("accessFrequency", details.accessFrequency || ""); setValue("uiExperienceDesign", details.uiExperienceDesign || ""); diff --git a/components/landing-page/survey.tsx b/components/landing-page/survey.tsx index fc3efc6d..915367f4 100644 --- a/components/landing-page/survey.tsx +++ b/components/landing-page/survey.tsx @@ -17,7 +17,6 @@ import { useState } from "react"; import { createTaskTa } from "@/service/task"; import { createSurveyData } from "@/service/survey/survey"; -// Schema untuk validasi const surveySchema = z.object({ accessFrequency: z.string(), uiExperienceDesign: z.string(), diff --git a/components/partials/auth/login-form.tsx b/components/partials/auth/login-form.tsx index 59060d31..b2ceeb25 100644 --- a/components/partials/auth/login-form.tsx +++ b/components/partials/auth/login-form.tsx @@ -206,17 +206,20 @@ const LoginForm = () => { Number(profile?.data?.data?.roleId) == 18 || Number(profile?.data?.data?.roleId) == 19 ) { - if (profile?.data?.data?.roleId === 18 || profile?.data?.data?.roleId === 2) { + if ( + profile?.data?.data?.roleId === 18 || + profile?.data?.data?.roleId === 2 + ) { window.location.href = "/in/dashboard/executive"; // router.push('/admin/dashboard'); Cookies.set("status", "login", { expires: 1, }); } else if ( - profile?.data?.data?.userLevel?.id == 761 || + profile?.data?.data?.userLevel?.id == 794 || profile?.data?.data?.userLevel?.parentLevelId == 761 ) { - window.location.href = "/in/dashboard/executive"; + window.location.href = "/in/dashboard"; Cookies.set("status", "login", { expires: 1, }); diff --git a/messages/en.json b/messages/en.json index 7528dd73..6dc3172f 100644 --- a/messages/en.json +++ b/messages/en.json @@ -639,6 +639,8 @@ "title": "Title", "category-name": "Category Name", "upload-date": "Upload Date", + "generate-date": "Generate Date", + "status": "status", "creator-group": "Creator Group", "source": "source", "published": "Published", diff --git a/messages/in.json b/messages/in.json index a73f9dac..84cfba0e 100644 --- a/messages/in.json +++ b/messages/in.json @@ -640,6 +640,8 @@ "title": "Judul", "category-name": "Nama Kategori", "upload-date": "Tanggal Upload", + "generate-date": "Tanggal Generate", + "status": "status", "creator-group": "Pembuat", "source": "Sumber", "published": "Diterbitkan",