Compare commits
111 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e26e639785 | |
|
|
d4ea662850 | |
|
|
3c95ac87b6 | |
|
|
cafb85da4a | |
|
|
484c9c6362 | |
|
|
fea5814222 | |
|
|
dad8d99019 | |
|
|
f612fb4024 | |
|
|
8e679a4a36 | |
|
|
3d9d1cc80e | |
|
|
c00f4094ef | |
|
|
b38b20e881 | |
|
|
d641681ee4 | |
|
|
f2e3d7f731 | |
|
|
ec2e0ef1b8 | |
|
|
497ebc949f | |
|
|
1ebf0f9b56 | |
|
|
1344de4c48 | |
|
|
573fc57991 | |
|
|
f1589b5316 | |
|
|
e88453c069 | |
|
|
3b1db0a8fc | |
|
|
6be98efc2f | |
|
|
229f6af8bf | |
|
|
41cd503510 | |
|
|
6747a1011d | |
|
|
c49450e704 | |
|
|
4b181b53c0 | |
|
|
9ff167e18d | |
|
|
973399c0aa | |
|
|
c3ea4dcd6d | |
|
|
5bae5603b7 | |
|
|
e5771ae8f4 | |
|
|
d110f85e30 | |
|
|
34311f2fc4 | |
|
|
4427fc2ed6 | |
|
|
28c94c5230 | |
|
|
c02c6661f7 | |
|
|
18d3603734 | |
|
|
eb1bd6903f | |
|
|
459ba05261 | |
|
|
c37ab71a23 | |
|
|
049f0cf8fc | |
|
|
308e708a3f | |
|
|
b8f80c43a9 | |
|
|
19e019fbe9 | |
|
|
270fa658a7 | |
|
|
c4c0b20bc6 | |
|
|
1b8b4e4302 | |
|
|
d4e8483dae | |
|
|
a738e61277 | |
|
|
7ad85eb8a9 | |
|
|
a093fb831b | |
|
|
471539804c | |
|
|
d64ce7fc14 | |
|
|
91f34586cf | |
|
|
082ee41058 | |
|
|
f3febf88c3 | |
|
|
eda6921ae2 | |
|
|
dd6dd508cd | |
|
|
db89e73d11 | |
|
|
5080ae17e5 | |
|
|
0e87d7d627 | |
|
|
c065569c28 | |
|
|
2a9b676c5d | |
|
|
6b93b8b79f | |
|
|
921fd247d4 | |
|
|
f05ade4d3c | |
|
|
552f369ec7 | |
|
|
e686672363 | |
|
|
da1b0ff839 | |
|
|
a4f94e1c3a | |
|
|
4e7eb26fd8 | |
|
|
63fe08f810 | |
|
|
1118772844 | |
|
|
34434b84d4 | |
|
|
be6a09a35a | |
|
|
6b0ee4cce5 | |
|
|
89c71a5acc | |
|
|
400a01d0bb | |
|
|
0d04ea0b14 | |
|
|
24d27df67e | |
|
|
e064a7a431 | |
|
|
d22ec72066 | |
|
|
85309da98e | |
|
|
6286b5c297 | |
|
|
128c25fdc4 | |
|
|
99dbeaabb4 | |
|
|
776747c75d | |
|
|
1d2e9c3d12 | |
|
|
717bd7e4ea | |
|
|
5e019e10b1 | |
|
|
4e47a5ff19 | |
|
|
b6e5e65144 | |
|
|
bb1229e4fa | |
|
|
c5e4aac78e | |
|
|
24418ddb9b | |
|
|
3e4dedfff7 | |
|
|
900468d2c6 | |
|
|
922ddcc828 | |
|
|
6931edf52d | |
|
|
575dacc7e6 | |
|
|
d18bbfe568 | |
|
|
e7482b346d | |
|
|
4939ba3b09 | |
|
|
7ba426c1b8 | |
|
|
30181cefe4 | |
|
|
fb92cfeff2 | |
|
|
58d475bc98 | |
|
|
1aa7652eb4 | |
|
|
949b0e1924 |
|
|
@ -0,0 +1 @@
|
||||||
|
NEXT_PUBLIC_MAPS_API_KEY=AIzaSyCOkxoeKykE60L_nM4VS1JYJqBmqy2GA0Q
|
||||||
|
|
@ -7,10 +7,12 @@ build-dev:
|
||||||
when: on_success
|
when: on_success
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
- dev-restructure
|
||||||
|
- dev-main
|
||||||
image: docker:stable
|
image: docker:stable
|
||||||
services:
|
services:
|
||||||
- name: docker:dind
|
- name: docker:dind
|
||||||
command: ["--insecure-registry=103.82.242.92:8900"]
|
command: ["--insecure-registry=103.82.242.92:8900"]
|
||||||
script:
|
script:
|
||||||
- docker logout
|
- docker logout
|
||||||
- docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 103.82.242.92:8900
|
- docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 103.82.242.92:8900
|
||||||
|
|
@ -22,8 +24,10 @@ auto-deploy:
|
||||||
when: on_success
|
when: on_success
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
- dev-restructure
|
||||||
|
- dev-main
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
- curl --user cekmedsos:$JENKINS_PWD http://103.82.242.92:8080/job/autodeploy-humas/build?token=autodeployhumas
|
- curl --user admin:$JENKINS_PWD http://38.47.180.165:8080/job/autodeploy-humas/build?token=autodeployhumas
|
||||||
|
|
|
||||||
24
Dockerfile
24
Dockerfile
|
|
@ -1,24 +1,36 @@
|
||||||
FROM node:21-alpine
|
FROM node:23.5.0-alpine
|
||||||
|
|
||||||
ENV PORT 4000
|
ENV PORT 4000
|
||||||
|
|
||||||
|
# pnpm install globally
|
||||||
|
# RUN npm install -g pnpm
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Installing dependencies
|
# Installing dependencies
|
||||||
COPY package*.json /usr/src/app/
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# Copy ckeditor5 to workdir
|
||||||
|
COPY vendor/ckeditor5 ./vendor/ckeditor5
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
# RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# RUN npm install --force
|
# RUN npm install --force
|
||||||
RUN npm install -g npm@latest
|
# RUN npm install -g npm@latest
|
||||||
RUN npm install
|
RUN npm install --legacy-peer-deps
|
||||||
|
|
||||||
# Copying source files
|
# Copying source files
|
||||||
COPY . /usr/src/app
|
COPY . .
|
||||||
|
|
||||||
# Building app
|
# Building app
|
||||||
|
RUN rm -rf .next
|
||||||
|
# RUN pnpm run build
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
|
|
||||||
# Running the app
|
# Running the app
|
||||||
CMD "npm" "run" "start"
|
CMD ["npm", "run", "start"]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
import FormArticle from '@/components/form/form-article'
|
import CreateArticleForm from "@/components/form/article/create-article-form";
|
||||||
import { Card } from '@nextui-org/react'
|
import FormArticle from "@/components/form/form-article";
|
||||||
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
export default function CreateArticle() {
|
export default function CreateArticle() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent">
|
<div className="bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
|
||||||
<FormArticle />
|
{/* <FormArticle /> */}
|
||||||
</Card>
|
<CreateArticleForm />
|
||||||
)
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import FormDetailArticle from '@/components/form/form-detail-article'
|
import EditArticleForm from "@/components/form/article/edit-article-form";
|
||||||
import { Card } from '@nextui-org/react'
|
|
||||||
|
|
||||||
export default function DetailArticlePage() {
|
export default function DetailArticlePage() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent">
|
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
|
||||||
<FormDetailArticle />
|
{/* <FormDetailArticle /> */}
|
||||||
</Card>
|
<EditArticleForm isDetail={true} />
|
||||||
)
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
import FormUpdateArticle from '@/components/form/form-edit-article'
|
import EditArticleForm from "@/components/form/article/edit-article-form";
|
||||||
import { Card } from '@nextui-org/react'
|
|
||||||
|
|
||||||
export default function UpdateArticlePage() {
|
export default function UpdateArticlePage() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent">
|
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
|
||||||
<FormUpdateArticle />
|
<EditArticleForm isDetail={false} />
|
||||||
</Card>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
"use client";
|
||||||
|
import EditGeneratedArticleChecker from "@/components/form/article/edit-generated-article-checker-form";
|
||||||
|
import EditGeneratedArticleContent from "@/components/form/article/edit-generated-article-content-form";
|
||||||
|
import { Card } from "@heroui/react";
|
||||||
|
import { Tab, Tabs } from "@heroui/react";
|
||||||
|
|
||||||
|
import { useParams } from "next/navigation";
|
||||||
|
|
||||||
|
export default function EditGeneratedArticlePage() {
|
||||||
|
const params = useParams();
|
||||||
|
const id = String(params.id);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="rounded-md border bg-transparent p-6 overflow-auto">
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
|
<Tabs aria-label="Options">
|
||||||
|
<Tab key="content" title="Content">
|
||||||
|
<EditGeneratedArticleContent id={id} />
|
||||||
|
</Tab>
|
||||||
|
<Tab key="checker" title="Checker">
|
||||||
|
<EditGeneratedArticleChecker id={id} />
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import GenerateArticleForm from "@/components/form/article/generate-article-form";
|
||||||
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
|
export default function GenerateArticle() {
|
||||||
|
return (
|
||||||
|
<Card className="rounded-md border bg-transparent">
|
||||||
|
<GenerateArticleForm />
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,24 +1,28 @@
|
||||||
"use client"
|
"use client";
|
||||||
import { AddIcon } from "@/components/icons";
|
import { AddIcon } from "@/components/icons";
|
||||||
import ArticleTable from "@/components/table/article-table";
|
import ArticleTable from "@/components/table/article-table";
|
||||||
import { Button, Card } from "@nextui-org/react";
|
import generatedArticleIds from "@/store/generated-article-store";
|
||||||
|
import { Button, Card } from "@heroui/react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function BasicPage() {
|
export default function BasicPage() {
|
||||||
return (
|
return (
|
||||||
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-2 ml-4">
|
<div className="overflow-x-hidden overflow-y-scroll">
|
||||||
<div className="px-4">
|
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||||
<Card className="rounded-md my-5 pl-5 py-2">
|
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
|
||||||
<Link href="/admin/article/create">
|
<Link href="/admin/article/create">
|
||||||
<Button size="md" color="primary" className="w-min">
|
<Button
|
||||||
<AddIcon />New Article
|
size="md"
|
||||||
</Button>
|
className="bg-[#F07C00] text-white w-full lg:w-fit"
|
||||||
</Link>
|
>
|
||||||
</Card>
|
Tambah Artikel
|
||||||
<Card className="rounded-md my-5">
|
<AddIcon />
|
||||||
<ArticleTable />
|
</Button>
|
||||||
</Card>
|
</Link>
|
||||||
</div>
|
<ArticleTable />
|
||||||
</div>
|
</div>
|
||||||
);
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import DashboardContainer from "@/components/main/dashboard/dashboard-container";
|
import DashboardContainer from "@/components/main/dashboard/dashboard-container";
|
||||||
|
|
||||||
export default function AdminPage() {
|
export default function AdminPage() {
|
||||||
return (
|
return (
|
||||||
<div className="flex h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-small ml-4">
|
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid">
|
||||||
<div className="px-4">
|
<div className="lg:px-4 !w-screen lg:!w-auto">
|
||||||
<DashboardContainer />
|
<DashboardContainer />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import CreateMagazineForm from '@/components/form/magazine/magazine-form'
|
|
||||||
import MagazineTable from '@/components/table/magazine/magazine-table'
|
|
||||||
import React from 'react'
|
|
||||||
|
|
||||||
const AdminMagazineCreate = () => {
|
|
||||||
return (
|
|
||||||
<div><CreateMagazineForm /></div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AdminMagazineCreate
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import MagazineTable from '@/components/table/magazine/magazine-table'
|
|
||||||
import React from 'react'
|
|
||||||
|
|
||||||
const AdminMagazine = () => {
|
|
||||||
return (
|
|
||||||
<div><MagazineTable /></div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AdminMagazine
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import NewCreateMagazineForm from "@/components/form/magazine/create-magazine-form";
|
||||||
|
import CreateMagazineForm from "@/components/form/magazine/magazine-form";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const AdminMagazineCreate = () => {
|
||||||
|
return (
|
||||||
|
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
|
||||||
|
<NewCreateMagazineForm />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AdminMagazineCreate;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import EditMagazineForm from "@/components/form/magazine/edit-magazine-form";
|
||||||
|
|
||||||
|
export default function DetailArticlePage() {
|
||||||
|
return (
|
||||||
|
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
|
||||||
|
<EditMagazineForm isDetail={true} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import EditMagazineForm from "@/components/form/magazine/edit-magazine-form";
|
||||||
|
|
||||||
|
export default function EditArticlePage() {
|
||||||
|
return (
|
||||||
|
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
|
||||||
|
<EditMagazineForm isDetail={false} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
"use client";
|
||||||
|
import { AddIcon } from "@/components/icons";
|
||||||
|
import MagazineTable from "@/components/table/magazine/magazine-table";
|
||||||
|
import { Button } from "@heroui/react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
export default function MagazineTablePage() {
|
||||||
|
return (
|
||||||
|
<div className="overflow-x-hidden overflow-y-scroll">
|
||||||
|
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||||
|
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
|
||||||
|
<Link href="/admin/magazine/create">
|
||||||
|
<Button
|
||||||
|
size="md"
|
||||||
|
className="bg-[#F07C00] text-white w-full lg:w-fit"
|
||||||
|
>
|
||||||
|
Tambah Majalah
|
||||||
|
<AddIcon />
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
<MagazineTable />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,371 @@
|
||||||
|
"use client";
|
||||||
|
import { AddIcon, CloudUploadIcon, TimesIcon } from "@/components/icons";
|
||||||
|
import ArticleTable from "@/components/table/article-table";
|
||||||
|
import CategoriesTable from "@/components/table/master-categories/categories-table";
|
||||||
|
import generatedArticleIds from "@/store/generated-article-store";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Card,
|
||||||
|
Chip,
|
||||||
|
Input,
|
||||||
|
Modal,
|
||||||
|
ModalBody,
|
||||||
|
ModalContent,
|
||||||
|
ModalFooter,
|
||||||
|
ModalHeader,
|
||||||
|
Textarea,
|
||||||
|
useDisclosure,
|
||||||
|
} from "@heroui/react";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import * as z from "zod";
|
||||||
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
|
import { Controller, useForm } from "react-hook-form";
|
||||||
|
import { Fragment, useEffect, useState } from "react";
|
||||||
|
import { getArticleByCategory } from "@/service/article";
|
||||||
|
import ReactSelect from "react-select";
|
||||||
|
import makeAnimated from "react-select/animated";
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import { close, error, loading } from "@/config/swal";
|
||||||
|
import {
|
||||||
|
createCategory,
|
||||||
|
uploadCategoryThumbnail,
|
||||||
|
} from "@/service/master-categories";
|
||||||
|
import Swal from "sweetalert2";
|
||||||
|
import withReactContent from "sweetalert2-react-content";
|
||||||
|
|
||||||
|
const categorySchema = z.object({
|
||||||
|
id: z.number(),
|
||||||
|
label: z.string(),
|
||||||
|
value: z.number(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const createArticleSchema = z.object({
|
||||||
|
title: z.string().min(2, {
|
||||||
|
message: "Judul harus diisi",
|
||||||
|
}),
|
||||||
|
description: z.string().min(2, {
|
||||||
|
message: "Deskripsi harus diisi",
|
||||||
|
}),
|
||||||
|
tags: z.array(z.string()),
|
||||||
|
// tags: z.array(z.string()).nonempty({
|
||||||
|
// message: "Minimal 1 tag",
|
||||||
|
// }),
|
||||||
|
});
|
||||||
|
|
||||||
|
interface CategoryType {
|
||||||
|
id: number;
|
||||||
|
label: string;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function MasterCategoryTable() {
|
||||||
|
const router = useRouter();
|
||||||
|
const MySwal = withReactContent(Swal);
|
||||||
|
|
||||||
|
const animatedComponents = makeAnimated();
|
||||||
|
const { isOpen, onOpen, onOpenChange, onClose } = useDisclosure();
|
||||||
|
const [listCategory, setListCategory] = useState<CategoryType[]>([]);
|
||||||
|
const [files, setFiles] = useState<File[]>([]);
|
||||||
|
const [refresh, setRefresh] = useState(false);
|
||||||
|
const [tag, setTag] = useState("");
|
||||||
|
|
||||||
|
const formOptions = {
|
||||||
|
resolver: zodResolver(createArticleSchema),
|
||||||
|
defaultValues: { title: "", description: "", category: [], tags: [] },
|
||||||
|
};
|
||||||
|
|
||||||
|
const { getRootProps, getInputProps } = useDropzone({
|
||||||
|
onDrop: (acceptedFiles) => {
|
||||||
|
setFiles(acceptedFiles.map((file) => Object.assign(file)));
|
||||||
|
},
|
||||||
|
maxFiles: 1,
|
||||||
|
});
|
||||||
|
type UserSettingSchema = z.infer<typeof createArticleSchema>;
|
||||||
|
const {
|
||||||
|
control,
|
||||||
|
handleSubmit,
|
||||||
|
formState: { errors },
|
||||||
|
setValue,
|
||||||
|
getValues,
|
||||||
|
watch,
|
||||||
|
setError,
|
||||||
|
clearErrors,
|
||||||
|
} = useForm<UserSettingSchema>(formOptions);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
fetchCategory();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const fetchCategory = async () => {
|
||||||
|
const res = await getArticleByCategory();
|
||||||
|
if (res?.data?.data) {
|
||||||
|
setupCategory(res?.data?.data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const setupCategory = (data: any) => {
|
||||||
|
const temp = [];
|
||||||
|
for (const element of data) {
|
||||||
|
temp.push({
|
||||||
|
id: element.id,
|
||||||
|
label: element.title,
|
||||||
|
value: element.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setListCategory(temp);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSubmit = async (values: z.infer<typeof createArticleSchema>) => {
|
||||||
|
console.log("values,", values);
|
||||||
|
loading();
|
||||||
|
const formData = {
|
||||||
|
title: values.title,
|
||||||
|
statusId: 1,
|
||||||
|
parentId: 1,
|
||||||
|
tags: values.tags.join(","),
|
||||||
|
description: values.description,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await createCategory(formData);
|
||||||
|
|
||||||
|
if (response?.error) {
|
||||||
|
error(response.message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const categoryId = response?.data?.data?.id;
|
||||||
|
const formFiles = new FormData();
|
||||||
|
|
||||||
|
formFiles.append("files", files[0]);
|
||||||
|
const resFile = await uploadCategoryThumbnail(categoryId, formFiles);
|
||||||
|
if (resFile?.error) {
|
||||||
|
error(resFile.message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
close();
|
||||||
|
setRefresh(!refresh);
|
||||||
|
MySwal.fire({
|
||||||
|
title: "Sukses",
|
||||||
|
icon: "success",
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
confirmButtonText: "OK",
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRemoveFile = (file: File) => {
|
||||||
|
const uploadedFiles = files;
|
||||||
|
const filtered = uploadedFiles.filter((i) => i.name !== file.name);
|
||||||
|
setFiles([...filtered]);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="overflow-x-hidden overflow-y-scroll">
|
||||||
|
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||||
|
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
|
||||||
|
<Button
|
||||||
|
size="md"
|
||||||
|
className="bg-[#F07C00] text-white w-full lg:w-fit"
|
||||||
|
onPress={onOpen}
|
||||||
|
>
|
||||||
|
Tambah Kategori
|
||||||
|
<AddIcon />
|
||||||
|
</Button>
|
||||||
|
<CategoriesTable triggerRefresh={refresh} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Modal isOpen={isOpen} onOpenChange={onOpenChange} size="3xl">
|
||||||
|
<ModalContent>
|
||||||
|
{() => (
|
||||||
|
<>
|
||||||
|
<ModalHeader className="flex flex-col gap-1">
|
||||||
|
Kategori Baru
|
||||||
|
</ModalHeader>
|
||||||
|
<ModalBody>
|
||||||
|
<form
|
||||||
|
onSubmit={handleSubmit(onSubmit)}
|
||||||
|
className="flex flex-col gap-3"
|
||||||
|
>
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<p className="text-sm">Nama Kategori</p>
|
||||||
|
<Controller
|
||||||
|
control={control}
|
||||||
|
name="title"
|
||||||
|
render={({ field: { onChange, value } }) => (
|
||||||
|
<Input
|
||||||
|
type="text"
|
||||||
|
id="title"
|
||||||
|
placeholder=""
|
||||||
|
label=""
|
||||||
|
value={value}
|
||||||
|
onChange={onChange}
|
||||||
|
labelPlacement="outside"
|
||||||
|
className="w-full "
|
||||||
|
classNames={{
|
||||||
|
inputWrapper: [
|
||||||
|
"border-1 rounded-lg",
|
||||||
|
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
variant="bordered"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
{errors?.title && (
|
||||||
|
<p className="text-red-400 text-sm">
|
||||||
|
{errors.title?.message}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<p className="text-sm">Deskripsi</p>
|
||||||
|
<Controller
|
||||||
|
control={control}
|
||||||
|
name="description"
|
||||||
|
render={({ field: { onChange, value } }) => (
|
||||||
|
<Textarea
|
||||||
|
type="text"
|
||||||
|
id="description"
|
||||||
|
placeholder=""
|
||||||
|
label=""
|
||||||
|
value={value}
|
||||||
|
onChange={onChange}
|
||||||
|
labelPlacement="outside"
|
||||||
|
className="w-full "
|
||||||
|
classNames={{
|
||||||
|
inputWrapper: [
|
||||||
|
"border-1 rounded-lg",
|
||||||
|
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
variant="bordered"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
{errors?.title && (
|
||||||
|
<p className="text-red-400 text-sm">
|
||||||
|
{errors.title?.message}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<p className="text-sm mt-3">Tag Terkait</p>
|
||||||
|
<Controller
|
||||||
|
control={control}
|
||||||
|
name="tags"
|
||||||
|
render={({ field: { onChange, value } }) => (
|
||||||
|
<Input
|
||||||
|
type="text"
|
||||||
|
id="tags"
|
||||||
|
placeholder=""
|
||||||
|
label=""
|
||||||
|
value={tag}
|
||||||
|
onValueChange={setTag}
|
||||||
|
startContent={
|
||||||
|
<div className="flex flex-row gap-1">
|
||||||
|
{value.map((item, index) => (
|
||||||
|
<Chip
|
||||||
|
color="primary"
|
||||||
|
key={index}
|
||||||
|
className=""
|
||||||
|
onClose={() => {
|
||||||
|
const filteredTags = value.filter(
|
||||||
|
(tag) => tag !== item
|
||||||
|
);
|
||||||
|
if (filteredTags.length === 0) {
|
||||||
|
setError("tags", {
|
||||||
|
type: "manual",
|
||||||
|
message: "Tags tidak boleh kosong",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
clearErrors("tags");
|
||||||
|
setValue(
|
||||||
|
"tags",
|
||||||
|
filteredTags as [string, ...string[]]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item}
|
||||||
|
</Chip>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
if (tag.trim() !== "") {
|
||||||
|
setValue("tags", [...value, tag.trim()]);
|
||||||
|
setTag("");
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
labelPlacement="outside"
|
||||||
|
className="w-full h-fit"
|
||||||
|
classNames={{
|
||||||
|
inputWrapper: [
|
||||||
|
"border-1 rounded-lg",
|
||||||
|
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
variant="bordered"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<p className="text-sm mt-3">Thumbnail</p>
|
||||||
|
{files.length < 1 && (
|
||||||
|
<Fragment>
|
||||||
|
<div {...getRootProps({ className: "dropzone" })}>
|
||||||
|
<input {...getInputProps()} />
|
||||||
|
<div className=" w-full text-center border-dashed border border-default-200 dark:border-default-300 rounded-md py-[52px] flex items-center flex-col">
|
||||||
|
<CloudUploadIcon />
|
||||||
|
<h4 className=" text-2xl font-medium mb-1 mt-3 text-card-foreground/80">
|
||||||
|
Tarik file disini atau klik untuk upload.
|
||||||
|
</h4>
|
||||||
|
<div className=" text-xs text-muted-foreground">
|
||||||
|
( Upload file dengan format .jpg, .jpeg, atau
|
||||||
|
.png. Ukuran maksimal 100mb.)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{files.length > 0 && (
|
||||||
|
<div className="flex flex-row gap-2">
|
||||||
|
<img
|
||||||
|
src={URL.createObjectURL(files[0])}
|
||||||
|
className="w-[30%]"
|
||||||
|
alt="thumbnail"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
className=" border-none rounded-full"
|
||||||
|
variant="bordered"
|
||||||
|
onClick={() => handleRemoveFile(files[0])}
|
||||||
|
>
|
||||||
|
<TimesIcon />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<ModalFooter className="self-end grow items-end">
|
||||||
|
<Button color="primary" type="submit">
|
||||||
|
Simpan
|
||||||
|
</Button>
|
||||||
|
<Button color="danger" variant="light" onPress={onClose}>
|
||||||
|
Tutup
|
||||||
|
</Button>
|
||||||
|
</ModalFooter>
|
||||||
|
</form>
|
||||||
|
</ModalBody>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</ModalContent>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import FormMasterUserRole from '@/components/form/form-master-user-role'
|
import FormMasterUserRole from "@/components/form/form-master-user-role";
|
||||||
import { Card } from '@nextui-org/react'
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
export default function CreateMasterUserRolePage() {
|
export default function CreateMasterUserRolePage() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent">
|
<Card className="h-[96vh] rounded-md bg-transparent">
|
||||||
<FormMasterUserRole />
|
<FormMasterUserRole />
|
||||||
</Card>
|
</Card>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import FormDetailMasterUserRole from '@/components/form/form-detail-master-user-role'
|
import FormDetailMasterUserRole from "@/components/form/form-detail-master-user-role";
|
||||||
import { Card } from '@nextui-org/react'
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
export default function DetailMasterRolePage() {
|
export default function DetailMasterRolePage() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent">
|
<Card className="h-[96vh] rounded-md my- ml-3 bg-transparent">
|
||||||
<FormDetailMasterUserRole />
|
<FormDetailMasterUserRole />
|
||||||
</Card>
|
</Card>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,27 @@
|
||||||
"use client"
|
"use client";
|
||||||
import { AddIcon } from "@/components/icons";
|
import { AddIcon } from "@/components/icons";
|
||||||
import MasterRoleTable from "@/components/table/master-role-table";
|
import MasterRoleTable from "@/components/table/master-role-table";
|
||||||
import { Button, Card } from "@nextui-org/react";
|
import { Button, Card } from "@heroui/react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
export default function MasterRolePage() {
|
export default function MasterRolePage() {
|
||||||
return (
|
return (
|
||||||
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-2 ml-4">
|
<div className="overflow-x-hidden overflow-y-scroll">
|
||||||
<div className="px-4">
|
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||||
<Card className="rounded-md my-5 pl-5 py-2">
|
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl py-3">
|
||||||
<Link href="/admin/master-role/create">
|
<Link href="/admin/master-role/create" className="mx-3">
|
||||||
<Button size="md" color="primary" className="w-min">
|
<Button
|
||||||
<AddIcon />New Role
|
size="md"
|
||||||
</Button>
|
color="primary"
|
||||||
</Link>
|
className="bg-[#F07C00] text-white"
|
||||||
</Card>
|
>
|
||||||
<Card className="rounded-md my-5">
|
Peran Baru
|
||||||
<MasterRoleTable />
|
<AddIcon />
|
||||||
</Card>
|
</Button>
|
||||||
</div>
|
</Link>
|
||||||
|
<MasterRoleTable />
|
||||||
</div>
|
</div>
|
||||||
);
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
import MagazineTable from '@/components/table/magazine/magazine-table'
|
import MappingUserLevel from "@/components/table/master/master-user-level/mapping-user-level";
|
||||||
import MenuDataTable from '@/components/table/master/master-menu/menu-data/menu-data-table'
|
import MasterUserLevelTable from "@/components/table/master/master-user-level/master-user-level-table";
|
||||||
import MasterModuleTable from '@/components/table/master/master-module/master-module-table'
|
import React from "react";
|
||||||
import MasterUserLevelTable from '@/components/table/master/master-user-level/master-user-level-table'
|
|
||||||
import React from 'react'
|
|
||||||
|
|
||||||
const AdminMasterUserLevel = () => {
|
const AdminMasterUserLevel = () => {
|
||||||
return (
|
return (
|
||||||
<div><MasterUserLevelTable /></div>
|
// <div><MasterUserLevelTable /></div>
|
||||||
)
|
<div>
|
||||||
}
|
<MappingUserLevel />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default AdminMasterUserLevel
|
export default AdminMasterUserLevel;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import FormMasterUser from '@/components/form/form-master-user'
|
import FormMasterUser from "@/components/form/form-master-user";
|
||||||
import { Card } from '@nextui-org/react'
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
export default function CreateMasterUserPage() {
|
export default function CreateMasterUserPage() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent">
|
<Card className="h-[96vh] rounded-md bg-transparent">
|
||||||
<FormMasterUser />
|
<FormMasterUser />
|
||||||
</Card>
|
</Card>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
import FormMasterUser from "@/components/form/form-master-user";
|
||||||
|
import FormMasterUserEdit from "@/components/form/form-master-user-edit";
|
||||||
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
|
export default function CreateMasterUserPage() {
|
||||||
|
return (
|
||||||
|
<Card className="h-[96vh] rounded-md bg-transparent">
|
||||||
|
<FormMasterUserEdit />
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,24 +1,27 @@
|
||||||
"use client"
|
"use client";
|
||||||
import { AddIcon } from "@/components/icons";
|
import { AddIcon } from "@/components/icons";
|
||||||
import MasterUserTable from "@/components/table/master-user-table";
|
import MasterUserTable from "@/components/table/master-user-table";
|
||||||
import { Button, Card } from "@nextui-org/react";
|
import { Button, Card } from "@heroui/react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
export default function MasterUserPage() {
|
export default function MasterUserPage() {
|
||||||
return (
|
return (
|
||||||
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-2 ml-4">
|
<div className="overflow-x-hidden overflow-y-scroll">
|
||||||
<div className="px-4">
|
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||||
<Card className="rounded-md my-5 pl-5 py-2">
|
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl py-3">
|
||||||
<Link href="/admin/master-user/create">
|
<Link href="/admin/master-user/create" className="mx-3">
|
||||||
<Button size="md" color="primary" className="w-min">
|
<Button
|
||||||
<AddIcon />New User
|
size="md"
|
||||||
</Button>
|
color="primary"
|
||||||
</Link>
|
className="bg-[#F07C00] text-white"
|
||||||
</Card>
|
>
|
||||||
<Card className="rounded-md my-5">
|
Pengguna Baru
|
||||||
<MasterUserTable />
|
<AddIcon />
|
||||||
</Card>
|
</Button>
|
||||||
</div>
|
</Link>
|
||||||
|
<MasterUserTable />
|
||||||
</div>
|
</div>
|
||||||
);
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import StaticPageBuilder from "@/components/main/static-page/static-page-main";
|
||||||
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
|
export default function StaticPageGenerator() {
|
||||||
|
return (
|
||||||
|
<div className="bg-transparent p-4 overflow-auto">
|
||||||
|
<StaticPageBuilder />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import StaticPageBuilderEdit from "@/components/form/static-page/static-page-edit-form";
|
||||||
|
import { Card } from "@heroui/react";
|
||||||
|
|
||||||
|
export default function StaticPageEdit() {
|
||||||
|
return (
|
||||||
|
<Card className="rounded-md bg-transparent p-4 overflow-auto">
|
||||||
|
<StaticPageBuilderEdit />
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { AddIcon } from "@/components/icons";
|
||||||
|
import StaticPageTable from "@/components/table/static-page-table";
|
||||||
|
import { Button, Card } from "@heroui/react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
export default function StaticPageGeneratorList() {
|
||||||
|
return (
|
||||||
|
<div className="overflow-x-hidden overflow-y-scroll rounded-lg">
|
||||||
|
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||||
|
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
|
||||||
|
<Link href="/admin/static-page/create">
|
||||||
|
<Button
|
||||||
|
size="md"
|
||||||
|
color="primary"
|
||||||
|
className="bg-[#F07C00] text-white w-full lg:w-fit"
|
||||||
|
>
|
||||||
|
Tambah Halaman
|
||||||
|
<AddIcon />
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
<StaticPageTable />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
|
import { AdminLayout } from "@/components/layout/admin-layout";
|
||||||
|
|
||||||
|
export default function AdminPageLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<AdminLayout>
|
||||||
|
{children}
|
||||||
|
</AdminLayout>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
"use client";
|
||||||
|
import PasswordForm from "@/components/form/settings/password";
|
||||||
|
import ProfileForm from "@/components/form/settings/profile";
|
||||||
|
import { close, loading } from "@/config/swal";
|
||||||
|
import { getProfile } from "@/service/master-user";
|
||||||
|
import { Tab, Tabs } from "@heroui/react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
export default function Settings() {
|
||||||
|
const [profile, setProfile] = useState<any>();
|
||||||
|
useEffect(() => {
|
||||||
|
initFetch();
|
||||||
|
}, []);
|
||||||
|
const initFetch = async () => {
|
||||||
|
loading();
|
||||||
|
const profile = await getProfile();
|
||||||
|
setProfile(profile?.data?.data);
|
||||||
|
close();
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div className="w-full lg:w-[60%] p-3">
|
||||||
|
<div className="flex flex-col bg-gray-50 shadow-md dark:bg-stone-900 text-black dark:text-white rounded-md p-5">
|
||||||
|
<Tabs aria-label="Tabs radius" radius="sm">
|
||||||
|
<Tab key="profile" title="Profile">
|
||||||
|
<ProfileForm profile={profile} doFetch={() => initFetch()} />
|
||||||
|
</Tab>
|
||||||
|
<Tab key="music" title="Password">
|
||||||
|
<PasswordForm doFetch={() => initFetch()} />
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
|
||||||
|
|
||||||
export default function AuthLayout({
|
export default function AuthLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <> {children}</>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,23 @@
|
||||||
import Login from '@/components/form/login'
|
"use client";
|
||||||
import React from 'react'
|
|
||||||
|
import Login from "@/components/form/login";
|
||||||
|
import QudoLogin from "@/components/form/qudo-login";
|
||||||
|
import Cookies from "js-cookie";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function AuthPage() {
|
export default function AuthPage() {
|
||||||
return (
|
const isAuthenticated = Cookies.get("is_authenticated") || "false";
|
||||||
<Login />
|
|
||||||
)
|
console.log("isAuthenticated : ", isAuthenticated);
|
||||||
|
|
||||||
|
const [hasMounted, setHasMounted] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setHasMounted(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
if (!hasMounted) return null;
|
||||||
|
|
||||||
|
return isAuthenticated == "true" ? <Login /> : <QudoLogin />;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,11 @@
|
||||||
'use client'
|
"use client";
|
||||||
|
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
|
||||||
export default function DocsLayout({
|
export default function DocsLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <HumasLayout>{children}</HumasLayout>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
|
||||||
|
|
||||||
export default function EMajalahLayout({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,22 @@
|
||||||
import ListEnewsPolri from '@/components/table/tabel-emajalah-polri'
|
"use client";
|
||||||
import React from 'react'
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
import ListEnewsPolri from "@/components/table/tabel-emajalah-polri";
|
||||||
|
import React, { Suspense, useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function ListEnewsPage() {
|
export default function ListEnewsPage() {
|
||||||
return (
|
const [hasMounted, setHasMounted] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setHasMounted(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
if (!hasMounted) return null;
|
||||||
|
return (
|
||||||
|
<HumasLayout>
|
||||||
|
<Suspense>
|
||||||
<ListEnewsPolri />
|
<ListEnewsPolri />
|
||||||
)
|
</Suspense>
|
||||||
|
</HumasLayout>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
|
||||||
export default function DetailEMajalahLayout({
|
export default function DetailEMajalahLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <>{children}</>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,22 @@
|
||||||
import EMagazineDetail from '@/components/detail/E-MagazineDetail'
|
"use client";
|
||||||
import React from 'react'
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
import EMagazineDetail from "@/components/main/detail/e-magazine-detail";
|
||||||
|
import React, { Suspense, useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function EnewsDetailPage() {
|
export default function EnewsDetailPage() {
|
||||||
return (
|
const [hasMounted, setHasMounted] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setHasMounted(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
if (!hasMounted) return null;
|
||||||
|
return (
|
||||||
|
<HumasLayout>
|
||||||
|
<Suspense>
|
||||||
<EMagazineDetail />
|
<EMagazineDetail />
|
||||||
)
|
</Suspense>
|
||||||
|
</HumasLayout>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
"use client";
|
||||||
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
|
||||||
export default function ApplicationLayout({
|
export default function ApplicationLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <HumasLayout>{children}</HumasLayout>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
"use client";
|
||||||
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
|
||||||
export default function KontakLayout({
|
export default function KontakLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <HumasLayout>{children}</HumasLayout>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
import Contact from '@/components/detail/Contact'
|
import Contact from "@/components/main/detail/contact";
|
||||||
|
import { Suspense } from "react";
|
||||||
|
|
||||||
export default function VisiMisiPage() {
|
export default function VisiMisiPage() {
|
||||||
return (
|
return (
|
||||||
<Contact />
|
<Suspense>
|
||||||
)
|
<Contact />
|
||||||
|
</Suspense>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
111
app/layout.tsx
111
app/layout.tsx
|
|
@ -1,47 +1,82 @@
|
||||||
import { fontSans } from "@/config/fonts";
|
import { fontSans } from "@/config/fonts";
|
||||||
import { siteConfig } from "@/config/site";
|
import { siteConfig } from "@/config/site";
|
||||||
|
import { Inter } from "next/font/google";
|
||||||
|
|
||||||
import "@/styles/globals.css";
|
import "@/styles/globals.css";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import { Metadata } from "next";
|
import { Metadata } from "next";
|
||||||
import { Providers } from "./providers";
|
import { Providers } from "./providers";
|
||||||
|
import LoadScript from "@/utils/global";
|
||||||
|
import { NextIntlClientProvider } from "next-intl";
|
||||||
|
import storedLanguage from "@/store/language-store";
|
||||||
|
import { getMessages } from "next-intl/server";
|
||||||
|
const inter = Inter({ subsets: ["latin"] });
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
// export const metadata: Metadata = {
|
||||||
title: {
|
// title: {
|
||||||
default: siteConfig.name,
|
// default: siteConfig.name,
|
||||||
template: `%s - ${siteConfig.name}`,
|
// template: `%s - ${siteConfig.name}`,
|
||||||
},
|
// },
|
||||||
description: siteConfig.description,
|
// description: siteConfig.description,
|
||||||
themeColor: [
|
// themeColor: [
|
||||||
{ media: "(prefers-color-scheme: light)", color: "white" },
|
// { media: "(prefers-color-scheme: light)", color: "white" },
|
||||||
{ media: "(prefers-color-scheme: dark)", color: "black" },
|
// { media: "(prefers-color-scheme: dark)", color: "black" },
|
||||||
],
|
// ],
|
||||||
icons: {
|
// icons: {
|
||||||
icon: "/logohumas.ico",
|
// icon: "/logohumas.ico",
|
||||||
shortcut: "/favicon-16x16.png",
|
// shortcut: "/favicon-16x16.png",
|
||||||
apple: "/apple-touch-icon.png",
|
// apple: "/apple-touch-icon.png",
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
|
|
||||||
export default function RootLayout({
|
export default async function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
params: { locale },
|
||||||
children: React.ReactNode;
|
}: Readonly<{
|
||||||
}) {
|
children: React.ReactNode;
|
||||||
return (
|
params: { locale: string };
|
||||||
<html lang="en" suppressHydrationWarning className="scroll-smooth">
|
}>) {
|
||||||
<head />
|
const messages = await getMessages();
|
||||||
<body
|
// const locale = storedLanguage((state) => state.locale);
|
||||||
className={clsx(
|
|
||||||
"bg-background font-sans antialiased",
|
// useEffect(() => {
|
||||||
fontSans.variable
|
// if (locale) {
|
||||||
)}
|
// setLocaleNow(locale);
|
||||||
>
|
// }
|
||||||
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}>
|
// }, [locale]);
|
||||||
<main className="">
|
|
||||||
{children}
|
// const [messages, setMessages] = useState<any>(null);
|
||||||
</main>
|
// useEffect(() => {
|
||||||
</Providers>
|
// (async () => {
|
||||||
</body>
|
// const loadedMessages = (await import(`../messages/${locale}.json`))
|
||||||
</html>
|
// .default;
|
||||||
);
|
// setMessages(loadedMessages);
|
||||||
|
// })();
|
||||||
|
// }, [locale]);
|
||||||
|
return (
|
||||||
|
<html lang="en" suppressHydrationWarning className="scroll-smooth">
|
||||||
|
<head>
|
||||||
|
<meta
|
||||||
|
name="theme-color"
|
||||||
|
content="white"
|
||||||
|
media="(prefers-color-scheme: light)"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="theme-color"
|
||||||
|
content="black"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
/>
|
||||||
|
<LoadScript />
|
||||||
|
</head>
|
||||||
|
<body
|
||||||
|
className={clsx("bg-background font-sans antialiased", inter.className)}
|
||||||
|
>
|
||||||
|
<NextIntlClientProvider locale={locale} messages={messages}>
|
||||||
|
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}>
|
||||||
|
<main className="">{children}</main>
|
||||||
|
</Providers>
|
||||||
|
</NextIntlClientProvider>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
|
||||||
export default function PoldaNewsLayout({
|
export default function PoldaNewsLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <HumasLayout>{children}</HumasLayout>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ListNews from '@/components/detail/ListNews'
|
import ListNews from "@/components/main/detail/list-news";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PoldaNewsPage() {
|
export default function PoldaNewsPage() {
|
||||||
return (
|
return <ListNews />;
|
||||||
<ListNews />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
"use client";
|
||||||
|
|
||||||
export default function AllNewsLayout({
|
export default function AllNewsLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <>{children}</>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,20 @@
|
||||||
import ListNews from '@/components/detail/ListNews'
|
"use client";
|
||||||
import React from 'react'
|
import ListNews from "@/components/main/detail/list-news";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
|
||||||
export default function ListNewsPage() {
|
export default function ListNewsPage() {
|
||||||
return (
|
const [hasMounted, setHasMounted] = useState(false);
|
||||||
<ListNews />
|
|
||||||
)
|
useEffect(() => {
|
||||||
|
setHasMounted(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
if (!hasMounted) return null;
|
||||||
|
return (
|
||||||
|
<HumasLayout>
|
||||||
|
<ListNews />
|
||||||
|
</HumasLayout>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
|
||||||
|
|
||||||
export default function NewsLayout({
|
export default function NewsLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <>{children}</>;
|
||||||
<HumasLayout>
|
|
||||||
{children}
|
|
||||||
</HumasLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,20 @@
|
||||||
import DetailPage from '@/components/detail/DetailPage'
|
"use client";
|
||||||
import React from 'react'
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
|
import DetailPage from "@/components/main/detail/new-detail";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function NewsPage() {
|
export default function NewsPage() {
|
||||||
return (
|
const [hasMounted, setHasMounted] = useState(false);
|
||||||
<DetailPage />
|
|
||||||
)
|
useEffect(() => {
|
||||||
|
setHasMounted(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
if (!hasMounted) return null;
|
||||||
|
return (
|
||||||
|
<HumasLayout>
|
||||||
|
<DetailPage />
|
||||||
|
</HumasLayout>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
40
app/page.tsx
40
app/page.tsx
|
|
@ -1,27 +1,27 @@
|
||||||
'use client'
|
"use client";
|
||||||
import BannerHumas from "@/components/Landing Page/BannerHumas";
|
import BannerHumas from "@/components/landing/BannerHumas";
|
||||||
import BodyLayout from "@/components/Landing Page/BodyLayout";
|
import BodyLayout from "@/components/landing/BodyLayout";
|
||||||
import HeaderNews from "@/components/Landing Page/HeaderNews";
|
import HeaderNews from "@/components/landing/HeaderNews";
|
||||||
import { HumasLayout } from "@/components/layout/HumasLayout";
|
import { HumasLayout } from "@/components/layout/humas-layout";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const [hasMounted, setHasMounted] = useState(false);
|
const [hasMounted, setHasMounted] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setHasMounted(true);
|
setHasMounted(true);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
if (!hasMounted) return null;
|
if (!hasMounted) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<HumasLayout>
|
<HumasLayout>
|
||||||
<BannerHumas />
|
<BannerHumas />
|
||||||
<HeaderNews />
|
<HeaderNews />
|
||||||
<BodyLayout />
|
<BodyLayout />
|
||||||
</HumasLayout>
|
</HumasLayout>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import { PPIDAdminLayout } from "@/components/layout/PPIDAdminLayout";
|
import { PPIDAdminLayout } from "@/components/layout/ppid-admin-layout";
|
||||||
|
|
||||||
export default function LayoutAdmin({
|
export default function LayoutAdmin({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return <PPIDAdminLayout>{children}</PPIDAdminLayout>;
|
||||||
<PPIDAdminLayout >
|
|
||||||
{children}
|
|
||||||
</PPIDAdminLayout>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function EPPIDPoldaLayout({
|
export default function EPPIDPoldaLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <PPIDLayout>{children}</PPIDLayout>;
|
||||||
<PPIDLayout>
|
|
||||||
{children}
|
|
||||||
</PPIDLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import PPIDPolda from '@/components/Portal PPID/PPIDPolda'
|
import PPIDPolda from "@/components/layout/portal-ppid/PPIDPolda";
|
||||||
|
|
||||||
export default function PPIDSakterPage() {
|
export default function PPIDSakterPage() {
|
||||||
return (
|
return <PPIDPolda />;
|
||||||
<PPIDPolda />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function EPPIDSatkerLayout({
|
export default function EPPIDSatkerLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <PPIDLayout>{children}</PPIDLayout>;
|
||||||
<PPIDLayout>
|
|
||||||
{children}
|
|
||||||
</PPIDLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import PPIDSatker from '@/components/Portal PPID/PPIDSatker'
|
import PPIDSatker from "@/components/layout/portal-ppid/PPIDSatker";
|
||||||
|
|
||||||
export default function PPIDSakterPage() {
|
export default function PPIDSakterPage() {
|
||||||
return (
|
return <PPIDSatker />;
|
||||||
<PPIDSatker />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import InformasiBerkala from '@/components/table/informasi-berkala'
|
import InformasiBerkala from "@/components/table/informasi-berkala-table";
|
||||||
|
|
||||||
export default function InformasiSMPage() {
|
export default function InformasiSMPage() {
|
||||||
return (
|
return <InformasiBerkala />;
|
||||||
<InformasiBerkala />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function InfoPublicLayout({
|
export default function InfoPublicLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <PPIDLayout>{children}</PPIDLayout>;
|
||||||
<PPIDLayout>
|
|
||||||
{children}
|
|
||||||
</PPIDLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function LayananInformasiLayout({
|
export default function LayananInformasiLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <PPIDLayout>{children}</PPIDLayout>;
|
||||||
<PPIDLayout>
|
|
||||||
{children}
|
|
||||||
</PPIDLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import StatiticAndRecap from '@/components/detail/StatistikRekapitulas'
|
import StatiticAndRecap from "@/components/main/detail/statistic-recap";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function StatisticPage() {
|
export default function StatisticPage() {
|
||||||
return (
|
return <StatiticAndRecap />;
|
||||||
<StatiticAndRecap />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,22 @@
|
||||||
'use client'
|
"use client";
|
||||||
import FooterPPID from '@/components/Portal PPID/FooterPPID';
|
|
||||||
import PPIDbody from '@/components/Portal PPID/PpidMain';
|
|
||||||
import PPIDBanner from '@/components/Portal PPID/ppid-banner';
|
|
||||||
import NavbarPPID from '@/components/navbar/NavbarPPID';
|
|
||||||
import { usePathname } from 'next/navigation';
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
|
|
||||||
|
import NavbarPPID from "@/components/layout/navbar/NavbarPPID";
|
||||||
|
import FooterPPID from "@/components/layout/portal-ppid/FooterPPID";
|
||||||
|
import PPIDBanner from "@/components/layout/portal-ppid/ppid-banner";
|
||||||
|
import PPIDbody from "@/components/layout/portal-ppid/PpidMain";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export default function PortalPPID(url: any) {
|
export default function PortalPPID(url: any) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NavbarPPID />
|
<NavbarPPID />
|
||||||
<PPIDBanner url={url} />
|
<PPIDBanner url={url} />
|
||||||
<PPIDbody />
|
<PPIDbody />
|
||||||
<FooterPPID />
|
<FooterPPID />
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import InformasiBerkala from '@/components/table/informasi-berkala'
|
import InformasiBerkala from "@/components/table/informasi-berkala-table";
|
||||||
|
|
||||||
export default function InformasiSMPage() {
|
export default function InformasiSMPage() {
|
||||||
return (
|
return <InformasiBerkala />;
|
||||||
<InformasiBerkala />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function DinamicSatkerLayout({
|
export default function DinamicSatkerLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
// const pathname = usePathname();
|
// const pathname = usePathname();
|
||||||
// console.log(pathname)
|
// console.log(pathname)
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function LayananInformasiLayout({
|
export default function LayananInformasiLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import StatiticAndRecap from '@/components/detail/StatistikRekapitulas'
|
import StatiticAndRecap from "@/components/main/detail/statistic-recap";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function StatisticPage() {
|
export default function StatisticPage() {
|
||||||
return (
|
return <StatiticAndRecap />;
|
||||||
<StatiticAndRecap />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,27 @@
|
||||||
'use client'
|
"use client";
|
||||||
import PPIDSatkerMain from '@/components/Portal PPID/PPIDMainSatker';
|
|
||||||
import PPIDBanner from '@/components/Portal PPID/ppid-banner';
|
import FooterSatker from "@/components/layout/navbar/FooterSatker";
|
||||||
import FooterSatker from '@/components/navbar/FooterSatker';
|
import NavbarSatker from "@/components/layout/navbar/NavbarSatker";
|
||||||
import NavbarSatker from '@/components/navbar/NavbarSatker';
|
import PPIDBanner from "@/components/layout/portal-ppid/ppid-banner";
|
||||||
import { usePathname } from 'next/navigation';
|
import PPIDSatkerMain from "@/components/layout/portal-ppid/PPIDMainSatker";
|
||||||
import React from 'react'
|
import { usePathname } from "next/navigation";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export default function PoldaPage() {
|
export default function PoldaPage() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const url: string = pathname.split('polda/')[1].replace(/-/g, ' ').toUpperCase();
|
const url: string = pathname
|
||||||
|
.split("polda/")[1]
|
||||||
|
.replace(/-/g, " ")
|
||||||
|
.toUpperCase();
|
||||||
|
|
||||||
|
return (
|
||||||
return (
|
<div className="text-black">
|
||||||
<div className='text-black'>
|
<div className="text-black">
|
||||||
<div className='text-black'>
|
<NavbarSatker />
|
||||||
<NavbarSatker />
|
<PPIDBanner url={url} />
|
||||||
<PPIDBanner url={url} />
|
<PPIDSatkerMain />
|
||||||
<PPIDSatkerMain />
|
<FooterSatker />
|
||||||
<FooterSatker />
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function DinamicSatkerLayout({
|
export default function DinamicSatkerLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
// const pathname = usePathname();
|
// const pathname = usePathname();
|
||||||
// console.log(pathname)
|
// console.log(pathname)
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import About from '@/components/detail/About'
|
import About from "@/components/main/detail/about";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PPIDProfile() {
|
export default function PPIDProfile() {
|
||||||
return (
|
return <About />;
|
||||||
<About />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import HistoryPPID from '@/components/page/HistoryPPID'
|
import HistoryPPID from "@/components/page/history-ppid";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PPIDProfilePage() {
|
export default function PPIDProfilePage() {
|
||||||
return (
|
return <HistoryPPID />;
|
||||||
<HistoryPPID />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import StrukturOrganisasi from "@/components/detail/StrukturOrganisasi";
|
import StrukturOrganisasi from "@/components/main/detail/structure";
|
||||||
|
|
||||||
export default function StructurePPID() {
|
export default function StructurePPID() {
|
||||||
return (
|
return <StrukturOrganisasi />;
|
||||||
<StrukturOrganisasi />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import Task from "@/components/detail/TaskDetail";
|
import Task from "@/components/main/detail/task-detail";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default function PPIDTask() {
|
export default function PPIDTask() {
|
||||||
return (
|
return <Task />;
|
||||||
<Task />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import VisiMisi from '@/components/detail/VisiMisi'
|
import VisiMisi from "@/components/main/detail/visi-misi";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function VMPPID() {
|
export default function VMPPID() {
|
||||||
return (
|
return <VisiMisi />;
|
||||||
<VisiMisi />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function RegulasiLayout({
|
export default function RegulasiLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
import PPIDSidebar from '@/components/Portal PPID/PPIDSidebar'
|
import PPIDSidebar from "@/components/layout/portal-ppid/PPIDSidebar";
|
||||||
import RegulationTable from '@/components/table/tabel-regulasi'
|
import RegulationTable from "@/components/table/tabel-regulasi";
|
||||||
|
|
||||||
export default function RegulasiPage() {
|
export default function RegulasiPage() {
|
||||||
return (
|
return (
|
||||||
<div className='md:flex'>
|
<div className="md:flex">
|
||||||
<div className='w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5'>
|
<div className="w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5">
|
||||||
<RegulationTable />
|
<RegulationTable />
|
||||||
</div>
|
</div>
|
||||||
<div className='w-auto md:w-1/3 lg:w-[25%]'>
|
<div className="w-auto md:w-1/3 lg:w-[25%]">
|
||||||
<PPIDSidebar />
|
<PPIDSidebar />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ServiceFlow from '@/components/detail/ServiceFlow'
|
import ServiceFlow from "@/components/main/detail/service-flow";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function ServiceFlowPage() {
|
export default function ServiceFlowPage() {
|
||||||
return (
|
return <ServiceFlow />;
|
||||||
<ServiceFlow />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,16 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function StandarLayananLayout({
|
export default function StandarLayananLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ServiceAnnouncement from '@/components/detail/ServiceAnnouncement'
|
import ServiceAnnouncement from "@/components/main/detail/service-announcement";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function ServiceAnnouncePage() {
|
export default function ServiceAnnouncePage() {
|
||||||
return (
|
return <ServiceAnnouncement />;
|
||||||
<ServiceAnnouncement />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ObjectionMecanism from '@/components/detail/ObjectionMecanism'
|
import ObjectionMecanism from "@/components/main/detail/objection-mecanism";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function ObjectionMecanismPage() {
|
export default function ObjectionMecanismPage() {
|
||||||
return (
|
return <ObjectionMecanism />;
|
||||||
<ObjectionMecanism />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import RequestDispute from '@/components/detail/RequestDispute'
|
import RequestDispute from "@/components/main/detail/reqeust-dispute";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function RequestDisputePage() {
|
export default function RequestDisputePage() {
|
||||||
return (
|
return <RequestDispute />;
|
||||||
<RequestDispute />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ServiceFee from '@/components/detail/ServiceFee'
|
import ServiceFee from "@/components/main/detail/service-fee";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function ServiceFeePage() {
|
export default function ServiceFeePage() {
|
||||||
return (
|
return <ServiceFee />;
|
||||||
<ServiceFee />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import RequestInformation from '@/components/detail/RequestInformation'
|
import RequestInformation from "@/components/main/detail/request-information";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function RequestInformationPage() {
|
export default function RequestInformationPage() {
|
||||||
return (
|
return <RequestInformation />;
|
||||||
<RequestInformation />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ServiceTime from '@/components/detail/ServiceTime'
|
import ServiceTime from "@/components/main/detail/serive-time";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function ServiceTimePage() {
|
export default function ServiceTimePage() {
|
||||||
return (
|
return <ServiceTime />;
|
||||||
<ServiceTime />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function PPIDProfileLayout({
|
export default function PPIDProfileLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <PPIDLayout>{children}</PPIDLayout>;
|
||||||
<PPIDLayout>
|
|
||||||
{children}
|
|
||||||
</PPIDLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import About from '@/components/detail/About'
|
import About from "@/components/main/detail/about";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PPIDProfile() {
|
export default function PPIDProfile() {
|
||||||
return (
|
return <About />;
|
||||||
<About />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import HistoryPPID from '@/components/page/HistoryPPID'
|
import HistoryPPID from "@/components/page/history-ppid";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PPIDProfilePage() {
|
export default function PPIDProfilePage() {
|
||||||
return (
|
return <HistoryPPID />;
|
||||||
<HistoryPPID />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import StrukturOrganisasi from "@/components/detail/StrukturOrganisasi";
|
import StrukturOrganisasi from "@/components/main/detail/structure";
|
||||||
|
|
||||||
export default function StructurePPID() {
|
export default function StructurePPID() {
|
||||||
return (
|
return <StrukturOrganisasi />;
|
||||||
<StrukturOrganisasi />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import Task from "@/components/detail/TaskDetail";
|
import Task from "@/components/main/detail/task-detail";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default function PPIDTask() {
|
export default function PPIDTask() {
|
||||||
return (
|
return <Task />;
|
||||||
<Task />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import VisiMisi from '@/components/detail/VisiMisi'
|
import VisiMisi from "@/components/main/detail/visi-misi";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function VMPPID() {
|
export default function VMPPID() {
|
||||||
return (
|
return <VisiMisi />;
|
||||||
<VisiMisi />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { PPIDLayout } from '@/components/layout/PPIDLayout';
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React, { Children } from 'react'
|
import React, { Children } from "react";
|
||||||
|
|
||||||
export default function RegulasiLayout({
|
export default function RegulasiLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <PPIDLayout>{children}</PPIDLayout>;
|
||||||
<PPIDLayout>
|
|
||||||
{children}
|
|
||||||
</PPIDLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
import PPIDSidebar from '@/components/Portal PPID/PPIDSidebar'
|
import PPIDSidebar from "@/components/layout/portal-ppid/PPIDSidebar";
|
||||||
import RegulationTable from '@/components/table/tabel-regulasi'
|
import RegulationTable from "@/components/table/tabel-regulasi";
|
||||||
|
|
||||||
export default function RegulasiPage() {
|
export default function RegulasiPage() {
|
||||||
return (
|
return (
|
||||||
<div className='md:flex'>
|
<div className="md:flex">
|
||||||
<div className='w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5'>
|
<div className="w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5">
|
||||||
<RegulationTable />
|
<RegulationTable />
|
||||||
</div>
|
</div>
|
||||||
<div className='w-auto md:w-1/3 lg:w-[25%]'>
|
<div className="w-auto md:w-1/3 lg:w-[25%]">
|
||||||
<PPIDSidebar />
|
<PPIDSidebar />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import InformasiBerkala from '@/components/table/informasi-berkala'
|
import InformasiBerkala from "@/components/table/informasi-berkala-table";
|
||||||
|
|
||||||
export default function InformasiSMPage() {
|
export default function InformasiSMPage() {
|
||||||
return (
|
return <InformasiBerkala />;
|
||||||
<InformasiBerkala />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function DinamicSatkerLayout({
|
export default function DinamicSatkerLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
// const pathname = usePathname();
|
// const pathname = usePathname();
|
||||||
// console.log(pathname)
|
// console.log(pathname)
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function LayananInformasiLayout({
|
export default function LayananInformasiLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import StatiticAndRecap from '@/components/detail/StatistikRekapitulas'
|
import StatiticAndRecap from "@/components/main/detail/statistic-recap";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function StatisticPage() {
|
export default function StatisticPage() {
|
||||||
return (
|
return <StatiticAndRecap />;
|
||||||
<StatiticAndRecap />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,24 @@
|
||||||
'use client'
|
"use client";
|
||||||
import PPIDSatkerMain from '@/components/Portal PPID/PPIDMainSatker';
|
|
||||||
import PPIDBanner from '@/components/Portal PPID/ppid-banner';
|
import FooterSatker from "@/components/layout/navbar/FooterSatker";
|
||||||
import FooterSatker from '@/components/navbar/FooterSatker';
|
import NavbarSatker from "@/components/layout/navbar/NavbarSatker";
|
||||||
import NavbarSatker from '@/components/navbar/NavbarSatker';
|
import PPIDBanner from "@/components/layout/portal-ppid/ppid-banner";
|
||||||
import { usePathname } from 'next/navigation';
|
import PPIDSatkerMain from "@/components/layout/portal-ppid/PPIDMainSatker";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
export default function SatkerPage() {
|
export default function SatkerPage() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const url: string = pathname.split('satuan-kerja/')[1].replace(/-/g, ' ').toUpperCase();
|
const url: string = pathname
|
||||||
|
.split("satuan-kerja/")[1]
|
||||||
|
.replace(/-/g, " ")
|
||||||
|
.toUpperCase();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='text-black'>
|
<div className="text-black">
|
||||||
<NavbarSatker />
|
<NavbarSatker />
|
||||||
<PPIDBanner url={url} />
|
<PPIDBanner url={url} />
|
||||||
<PPIDSatkerMain />
|
<PPIDSatkerMain />
|
||||||
<FooterSatker />
|
<FooterSatker />
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function DinamicSatkerLayout({
|
export default function DinamicSatkerLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
// const pathname = usePathname();
|
// const pathname = usePathname();
|
||||||
// console.log(pathname)
|
// console.log(pathname)
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import About from '@/components/detail/About'
|
import About from "@/components/main/detail/about";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PPIDProfile() {
|
export default function PPIDProfile() {
|
||||||
return (
|
return <About />;
|
||||||
<About />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import HistoryPPID from '@/components/page/HistoryPPID'
|
import HistoryPPID from "@/components/page/history-ppid";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function PPIDProfilePage() {
|
export default function PPIDProfilePage() {
|
||||||
return (
|
return <HistoryPPID />;
|
||||||
<HistoryPPID />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import StrukturOrganisasi from "@/components/detail/StrukturOrganisasi";
|
import StrukturOrganisasi from "@/components/main/detail/structure";
|
||||||
|
|
||||||
export default function StructurePPID() {
|
export default function StructurePPID() {
|
||||||
return (
|
return <StrukturOrganisasi />;
|
||||||
<StrukturOrganisasi />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import Task from "@/components/detail/TaskDetail";
|
import Task from "@/components/main/detail/task-detail";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default function PPIDTask() {
|
export default function PPIDTask() {
|
||||||
return (
|
return <Task />;
|
||||||
<Task />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import VisiMisi from '@/components/detail/VisiMisi'
|
import VisiMisi from "@/components/main/detail/visi-misi";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
|
|
||||||
export default function VMPPID() {
|
export default function VMPPID() {
|
||||||
return (
|
return <VisiMisi />;
|
||||||
<VisiMisi />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
'use client'
|
"use client";
|
||||||
import { SatkerLayout } from '@/components/layout/SatKerLayout';
|
import { SatkerLayout } from "@/components/layout/satker-layout";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
export default function RegulasiLayout({
|
export default function RegulasiLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
console.log(pathname)
|
console.log(pathname);
|
||||||
|
|
||||||
return (
|
return <SatkerLayout>{children}</SatkerLayout>;
|
||||||
<SatkerLayout>
|
|
||||||
{children}
|
|
||||||
</SatkerLayout>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
import PPIDSidebar from '@/components/Portal PPID/PPIDSidebar'
|
import PPIDSidebar from "@/components/layout/portal-ppid/PPIDSidebar";
|
||||||
import RegulationTable from '@/components/table/tabel-regulasi'
|
import RegulationTable from "@/components/table/tabel-regulasi";
|
||||||
|
|
||||||
export default function RegulasiPage() {
|
export default function RegulasiPage() {
|
||||||
return (
|
return (
|
||||||
<div className='md:flex'>
|
<div className="md:flex">
|
||||||
<div className='w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5'>
|
<div className="w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5">
|
||||||
<RegulationTable />
|
<RegulationTable />
|
||||||
</div>
|
</div>
|
||||||
<div className='w-auto md:w-1/3 lg:w-[25%]'>
|
<div className="w-auto md:w-1/3 lg:w-[25%]">
|
||||||
<PPIDSidebar />
|
<PPIDSidebar />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue