Merge branch 'main' of https://gitlab.com/hanifsalafi/mediahub_redesign into dev-rama
This commit is contained in:
commit
307f059db4
|
|
@ -17,6 +17,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { sendMediaUploadToEmail } from "@/service/media-tracking/media-tracking";
|
||||
import ImageBlurry from "@/components/ui/image-blurry";
|
||||
|
||||
const Galery = (props: any) => {
|
||||
const [profile, setProfile] = useState<any>();
|
||||
|
|
@ -284,20 +285,6 @@ const Galery = (props: any) => {
|
|||
<div className="mx-auto w-full max-w-7xl justify-start flex flex-col lg:flex-row gap-5 mb-4">
|
||||
<Tabs value={selectedTab} onValueChange={setSelectedTab}>
|
||||
<TabsList className="grid grid-cols-2 lg:flex lg:flex-row ">
|
||||
<TabsTrigger
|
||||
value="video"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio Visual
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="audio"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="image"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
|
|
@ -305,12 +292,26 @@ const Galery = (props: any) => {
|
|||
Foto
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="video"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio Visual
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="text"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Teks
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="audio"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
|
@ -323,9 +324,12 @@ const Galery = (props: any) => {
|
|||
<CardContent className="flex flex-col bg-black dark:bg-white w-full rounded-lg p-0">
|
||||
<div>
|
||||
<Link href={`/video/detail/${video?.mediaUpload?.slug}`}>
|
||||
<img src={video?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg " />
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{video?.mediaUpload?.title}</div>
|
||||
{/* <img src={video?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg " /> */}
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={video?.mediaUpload?.thumbnailLink} alt={video?.mediaUpload?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
</Link>
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{video?.mediaUpload?.title}</div>
|
||||
<Popover>
|
||||
<PopoverTrigger className="flex justify-end gap-1 cursor-pointer" asChild>
|
||||
<a className="flex justify-end items-end place-items-end">
|
||||
|
|
@ -454,9 +458,12 @@ const Galery = (props: any) => {
|
|||
<Card key={image?.id}>
|
||||
<CardContent className="flex flex-col bg-black dark:bg-white w-full h-full rounded-lg p-0">
|
||||
<Link href={`/image/detail/${image?.mediaUpload?.slug}`}>
|
||||
<img src={image?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" />
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{image?.mediaUpload?.title}</div>
|
||||
{/* <img src={image?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" /> */}
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={image?.mediaUpload?.thumbnailLink} alt={image?.mediaUpload?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
</Link>
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{image?.mediaUpload?.title}</div>
|
||||
<Popover>
|
||||
<PopoverTrigger className="flex justify-end gap-1 cursor-pointer" asChild>
|
||||
<a className="flex justify-end items-end place-items-end">
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import { Icon } from "@iconify/react/dist/iconify.js";
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { sendMediaUploadToEmail } from "@/service/media-tracking/media-tracking";
|
||||
import ImageBlurry from "@/components/ui/image-blurry";
|
||||
|
||||
const Galery = (props: any) => {
|
||||
const [profile, setProfile] = useState<any>();
|
||||
|
|
@ -290,20 +291,6 @@ const Galery = (props: any) => {
|
|||
<div className="mx-auto w-full max-w-7xl justify-start flex flex-col lg:flex-row gap-5 mb-4">
|
||||
<Tabs value={selectedTab} onValueChange={setSelectedTab}>
|
||||
<TabsList className="grid grid-cols-2 lg:flex lg:flex-row ">
|
||||
<TabsTrigger
|
||||
value="video"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio Visual
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="audio"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="image"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
|
|
@ -311,12 +298,26 @@ const Galery = (props: any) => {
|
|||
Foto
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="video"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio Visual
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="text"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Teks
|
||||
</TabsTrigger>
|
||||
<div className="text-[#bb3523] text-lg hidden md:inline-block">|</div>
|
||||
<TabsTrigger
|
||||
value="audio"
|
||||
className="relative text-xs md:text-xl font-bold text-black dark:text-white dark:bg-transparent before:absolute before:top-full before:left-0 before:h-px before:w-full data-[state=active]:before:bg-primary"
|
||||
>
|
||||
Audio
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
|
@ -329,7 +330,10 @@ const Galery = (props: any) => {
|
|||
<CardContent className="flex flex-col bg-black dark:bg-white w-full rounded-lg p-0">
|
||||
<div>
|
||||
<Link href={`/video/detail/${video?.mediaUpload?.slug}`}>
|
||||
<img src={video?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" />
|
||||
{/* <img src={video?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" /> */}
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={video?.mediaUpload?.thumbnailLink} alt={video?.mediaUpload?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
</Link>
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{video?.mediaUpload?.title}</div>
|
||||
<Popover>
|
||||
|
|
@ -458,9 +462,12 @@ const Galery = (props: any) => {
|
|||
<Card key={image?.id}>
|
||||
<CardContent className="flex flex-col bg-black dark:bg-white w-full rounded-lg p-0">
|
||||
<Link href={`/image/detail/${image?.mediaUpload?.slug}`}>
|
||||
<img src={image?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" />
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{image?.mediaUpload?.title}</div>
|
||||
{/* <img src={image?.mediaUpload?.thumbnailLink} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" /> */}
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={image?.mediaUpload?.thumbnailLink} alt={image?.mediaUpload?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
</Link>
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{image?.mediaUpload?.title}</div>
|
||||
<Popover>
|
||||
<PopoverTrigger className="flex justify-end gap-1 cursor-pointer" asChild>
|
||||
<a className="flex justify-end items-end place-items-end">
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import { Icon } from "@iconify/react/dist/iconify.js";
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { sendMediaUploadToEmail } from "@/service/media-tracking/media-tracking";
|
||||
import ImageBlurry from "@/components/ui/image-blurry";
|
||||
|
||||
const page = () => {
|
||||
const [, setProfile] = useState();
|
||||
|
|
@ -210,7 +211,10 @@ const page = () => {
|
|||
<CardContent className="flex flex-col bg-black dark:bg-white w-full rounded-lg p-0">
|
||||
<div className="">
|
||||
<Link href={`/content-management/rewrite/detail/${image.id}`}>
|
||||
<img src={image?.thumbnailUrl} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" />
|
||||
{/* <img src={image?.thumbnailUrl} className="h-40 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" /> */}
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={image?.thumbnailUrl} alt={image?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
</Link>
|
||||
<div className="font-semibold p-4 text-white text-xs lg:text-sm dark:text-black truncate w-full">{image?.title}</div>
|
||||
<Popover>
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ const FilterPage = () => {
|
|||
endDateString,
|
||||
monthYearFilter ? getOnlyMonthAndYear(monthYearFilter)?.split("/")[0]?.replace("", "") : "",
|
||||
monthYearFilter ? getOnlyMonthAndYear(monthYearFilter)?.split("/")[1] : "",
|
||||
locale == "en" ? true : false,
|
||||
locale == "en" ? true : false
|
||||
);
|
||||
close();
|
||||
// setGetTotalPage(response?.data?.data?.totalPages);
|
||||
|
|
@ -189,7 +189,7 @@ const FilterPage = () => {
|
|||
endDateString,
|
||||
monthYearFilter ? getOnlyMonthAndYear(monthYearFilter)?.split("/")[0]?.replace("", "") : "",
|
||||
monthYearFilter ? getOnlyMonthAndYear(monthYearFilter)?.split("/")[1] : "",
|
||||
locale == "en" ? true : false,
|
||||
locale == "en" ? true : false
|
||||
);
|
||||
close();
|
||||
// setGetTotalPage(response?.data?.data?.totalPages);
|
||||
|
|
@ -491,14 +491,8 @@ const FilterPage = () => {
|
|||
<CardContent className="flex flex-col text-xs lg:text-sm w-full p-0">
|
||||
<Link href={`/image/detail/${image?.slug}`}>
|
||||
{/* <img src={image?.thumbnailLink} className="h-60 object-cover items-center justify-center cursor-pointer rounded-lg" /> */}
|
||||
<div
|
||||
className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg"
|
||||
>
|
||||
<ImageBlurry
|
||||
src={image?.thumbnailLink}
|
||||
alt={image?.title}
|
||||
style={{ objectFit: "contain", width: "100%", height: "100%" }}
|
||||
/>
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={image?.thumbnailLink} alt={image?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
<div className="flex flex-row items-center gap-2 text-[10px] mx-2 mt-2">
|
||||
{formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| <Icon icon="formkit:eye" width="15" height="15" />
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import { useRouter } from "@/i18n/routing";
|
|||
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
|
||||
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
|
||||
import { close, loading } from "@/config/swal";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
const timeList = [
|
||||
{
|
||||
|
|
@ -118,16 +119,15 @@ const Schedule = (props: any) => {
|
|||
const router = useRouter();
|
||||
const [startDate, setStartDate] = useState<Date | undefined>(new Date());
|
||||
const [dateAWeek, setDateAWeek] = useState<string[]>([]);
|
||||
const [scheduleSearch, setScheduleSearch] = useState();
|
||||
const [todayList, setTodayList] = useState([]);
|
||||
const [prevdayList, setPrevdayList] = useState([]);
|
||||
const [nextdayList, setNextdayList] = useState([]);
|
||||
const [isOpen, setIsOpen] = React.useState(false);
|
||||
const [schedules, setSchedules] = useState([]);
|
||||
const [openDialog, setOpenDialog] = useState(false);
|
||||
const [detail, setDetail] = useState<any>();
|
||||
const [content, setContent] = useState();
|
||||
const { id } = props;
|
||||
const t = useTranslations("LandingPage");
|
||||
|
||||
useEffect(() => {
|
||||
async function getDataSchedule() {
|
||||
|
|
@ -511,10 +511,10 @@ const Schedule = (props: any) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* Component Kanan */}
|
||||
{/* komponen Kanan */}
|
||||
<div className="w-1/4 flex flex-col gap-6">
|
||||
<div className="relative text-gray-600 dark:text-white">
|
||||
<input type="text" placeholder="Masukkan Judul Jadwal" className="pl-8 pr-4 py-1 w-full border rounded-full text-sm focus:outline-none" />
|
||||
<input type="text" placeholder={t("titleSchedule")} className="pl-8 pr-4 py-1 w-full border rounded-full text-sm focus:outline-none" />
|
||||
<span className="absolute left-2 top-1/2 transform -translate-y-1/2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
|
|
@ -557,6 +557,7 @@ const Schedule = (props: any) => {
|
|||
</CollapsibleContent>
|
||||
))}
|
||||
</Collapsible> */}
|
||||
|
||||
<Accordion type="single" collapsible className="w-full">
|
||||
<AccordionItem value="item-1">
|
||||
<AccordionTrigger>Jadwal Hari ini</AccordionTrigger>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
|
||||
const DetailVideo = () => {
|
||||
const [selectedSize, setSelectedSize] = useState<string>("L");
|
||||
const [selectedTab, setSelectedTab] = useState("video");
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import ReactDatePicker from "react-datepicker";
|
|||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import { close, loading } from "@/config/swal";
|
||||
import { useTranslations } from "next-intl";
|
||||
import ImageBlurry from "@/components/ui/image-blurry";
|
||||
|
||||
const columns: ColumnDef<any>[] = [
|
||||
{
|
||||
|
|
@ -518,7 +519,10 @@ const FilterPage = () => {
|
|||
<Card key={video?.id} className="hover:scale-110 transition-transform duration-300">
|
||||
<CardContent className="flex flex-col text-xs lg:text-sm w-full p-0">
|
||||
<Link href={`/video/detail/${video?.slug}`}>
|
||||
<img src={video?.thumbnailLink} className="h-60 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" />
|
||||
{/* <img src={video?.thumbnailLink} className="h-60 object-cover items-center justify-center cursor-pointer rounded-lg place-self-center" /> */}
|
||||
<div className="img-container h-60 bg-[#e9e9e9] cursor-pointer rounded-lg">
|
||||
<ImageBlurry src={video?.thumbnailLink} alt={video?.title} style={{ objectFit: "contain", width: "100%", height: "100%" }} />
|
||||
</div>
|
||||
<div className="flex flex-row items-center gap-2 text-[10px] mx-2">
|
||||
{formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"}| <Icon icon="formkit:eye" width="15" height="15" />
|
||||
{video?.clickCount}{" "}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import { Textarea } from "@/components/ui/textarea";
|
|||
import { Icon } from "@/components/ui/icon";
|
||||
import dynamic from "next/dynamic";
|
||||
import ReactPasswordChecklist from "react-password-checklist";
|
||||
import { Select } from "@/components/ui/select";
|
||||
|
||||
type Inputs = {
|
||||
example: string;
|
||||
|
|
@ -34,7 +35,7 @@ const PasswordChecklist = dynamic(() => import("react-password-checklist"), {
|
|||
|
||||
const page = () => {
|
||||
const params = useParams();
|
||||
const [stepOneActive] = useState(true);
|
||||
const [stepOneActive, setStepOneActive] = useState(true);
|
||||
const [stepTwoActive, setStepTwoActive] = useState(false);
|
||||
const [stepThreeActive, setStepThreeActive] = useState(false);
|
||||
const [typePass, setTypePass] = useState("password");
|
||||
|
|
@ -66,6 +67,7 @@ const page = () => {
|
|||
const [districts, setDistricts] = useState([]);
|
||||
const [, setAssociation] = useState<any>();
|
||||
const [warningPassConf] = useState();
|
||||
const [otpValue, setOtpValue] = useState("");
|
||||
|
||||
const [otp1, setOtp1] = useState();
|
||||
const [otp2, setOtp2] = useState();
|
||||
|
|
@ -450,23 +452,27 @@ const page = () => {
|
|||
|
||||
const handleVerifyOTP = async () => {
|
||||
const otp = `${otp1}${otp2}${otp3}${otp4}${otp5}${otp6}`;
|
||||
|
||||
if (email != "" && otp.length == 6) {
|
||||
const dummyOtp = "123456";
|
||||
if (email != "" && otpValue.length == 6) {
|
||||
console.log("verify otp");
|
||||
loading();
|
||||
// const response = {
|
||||
// message: "success",
|
||||
// };
|
||||
const response = {
|
||||
message: otpValue == dummyOtp ? "success" : "failed",
|
||||
};
|
||||
|
||||
const response = await verifyOTP(email, otp);
|
||||
if (response?.error) {
|
||||
error(response?.message);
|
||||
return false;
|
||||
}
|
||||
// const response = await verifyOTP(email, otp);
|
||||
// if (response?.error) {
|
||||
// error(response?.message);
|
||||
// return false;
|
||||
// }
|
||||
close();
|
||||
// console.log(response);
|
||||
if (response?.message == "success") {
|
||||
console.log("success");
|
||||
setStepTwoActive(false);
|
||||
setStepThreeActive(true);
|
||||
setFormProfile(true);
|
||||
setOtpValidate("");
|
||||
|
|
@ -548,26 +554,20 @@ const page = () => {
|
|||
<div className="flex flex-row justify-center py-10">
|
||||
<ul className="flex flex-row items-center text-center">
|
||||
<li>
|
||||
<div className={`text-center text-black bg-[#f32d2d] h-[40px] w-[40px] border rounded-full ${stepOneActive ? "active bg-white border border-[#f32d2d] rounded-full text-[#f32d2d]" : ""}`}>
|
||||
<span>
|
||||
<b className="items-center">1</b>
|
||||
</span>
|
||||
<div className={`flex justify-center items-center text-center text-black bg-[#f32d2d] h-[40px] w-[40px] border rounded-full ${stepOneActive ? "active bg-white border border-[#f32d2d] rounded-full text-[#f32d2d]" : ""}`}>
|
||||
<b>1</b>
|
||||
</div>
|
||||
</li>
|
||||
<div className="w-16 h-1 z-[1] bg-[#f32d2d] "></div>
|
||||
<li>
|
||||
<div className={`text-center text-white bg-[#f32d2d] h-[40px] w-[40px] border rounded-full ${stepTwoActive ? "active bg-white border border-[#f32d2d] rounded-full text-[#f32d2d]" : ""}`}>
|
||||
<span>
|
||||
<b>2</b>
|
||||
</span>
|
||||
<div className={`flex justify-center items-center text-center text-black bg-[#f32d2d] h-[40px] w-[40px] border rounded-full ${stepTwoActive ? "active bg-white border border-[#f32d2d] rounded-full text-[#f32d2d]" : ""}`}>
|
||||
<b>2</b>
|
||||
</div>
|
||||
</li>
|
||||
<div className="w-16 h-1 bg-[#f32d2d]"></div>
|
||||
<li>
|
||||
<div className={`text-center text-white bg-[#f32d2d] h-[40px] w-[40px] borde rounded-full ${stepThreeActive ? "active bg-white border border-[#f32d2d] rounded-full text-[#f32d2d]" : ""}`}>
|
||||
<span>
|
||||
<b>3</b>
|
||||
</span>
|
||||
<div className={`flex justify-center items-center text-center text-black bg-[#f32d2d] h-[40px] w-[40px] borde rounded-full ${stepThreeActive ? "active bg-white border border-[#f32d2d] rounded-full text-[#f32d2d]" : ""}`}>
|
||||
<b>3</b>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -585,7 +585,7 @@ const page = () => {
|
|||
}
|
||||
>
|
||||
<p className="text-4xl px-12 font-bold ">{stepThreeActive ? "Silahkan lengkapi data pengguna" : "Silahkan registrasi terlebih dahulu"}</p>
|
||||
<p className="px-12">
|
||||
<p className="px-12 mt-2">
|
||||
Sudah memiliki akun?{" "}
|
||||
<Link href="/auth" className="text-red-500">
|
||||
<b>Masuk</b>
|
||||
|
|
@ -593,6 +593,7 @@ const page = () => {
|
|||
</p>
|
||||
</div>
|
||||
<div
|
||||
className="px-20 mb-6"
|
||||
style={
|
||||
!stepTwoActive || (stepOneActive && stepThreeActive)
|
||||
? {
|
||||
|
|
@ -601,10 +602,8 @@ const page = () => {
|
|||
: {}
|
||||
}
|
||||
>
|
||||
<h2 className="text-black px-12">
|
||||
<b>Masukkan Kode OTP</b>
|
||||
</h2>
|
||||
<p className="text-red-500 px-12">Silahkan cek inbox atau kotak spam pada email Anda.</p>
|
||||
<p className="text-black text-2xl px-20 font-semibold">Masukkan Kode OTP</p>
|
||||
<p className="text-red-500 text-sm px-20">Silahkan cek inbox atau kotak spam pada email Anda.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -684,9 +683,9 @@ const page = () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className={`flex flex-row mt-4 px-12 ${!stepTwoActive || stepThreeActive ? "hidden" : ""}`}>
|
||||
<div className="flex justify-center">
|
||||
<InputOTP maxLength={6}>
|
||||
<div className={`flex flex-col mt-4 px-12 ${!stepTwoActive || stepThreeActive ? "hidden" : ""}`}>
|
||||
<div className="flex justify-center mb-6">
|
||||
<InputOTP maxLength={6} onChange={(e) => setOtpValue(e)}>
|
||||
<InputOTPGroup>
|
||||
<InputOTPSlot index={0} onChange={(e: any) => setOtp1(e.target.value)} onKeyUp={handleTypeOTP} />
|
||||
<InputOTPSlot index={1} onChange={(e: any) => setOtp2(e.target.value)} onKeyUp={handleTypeOTP} />
|
||||
|
|
@ -706,17 +705,17 @@ const page = () => {
|
|||
<p className="text-red-500">
|
||||
<b>{otpValidate}</b>
|
||||
</p>
|
||||
<div className="flex justify-between mt-4">
|
||||
<a className="mr-1 w-full text-base cursor-pointer" onClick={() => handleResendOTP()}>
|
||||
<div className="flex flex-row px-28 justify-between items-center my-4">
|
||||
<a className="bg-slate-300 text-center rounded-lg mr-1 w-[200px] py-2 text-base cursor-pointer" onClick={() => handleResendOTP()}>
|
||||
Kirim Ulang ({convertMilisecondsToHour(timerCount)})
|
||||
</a>
|
||||
<a className="text-red-500 ml-1 w-[75%] cursor-pointer" onClick={() => handleVerifyOTP()}>
|
||||
<a className="bg-red-700 w-[200px] py-2 text-center text-white rounded-lg ml-1 cursor-pointer" onClick={() => handleVerifyOTP()}>
|
||||
Lanjut
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={`flex flex-row my-4 px-12 ${formProfile == false ? "hidden" : ""}`}>
|
||||
<div className={`flex flex-col gap-3 my-4 px-12 ${formProfile == false ? "hidden" : ""}`}>
|
||||
<div>
|
||||
{Number(category) == 6 || Number(category) == 7 ? (
|
||||
<div className="">
|
||||
|
|
@ -737,15 +736,15 @@ const page = () => {
|
|||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="">
|
||||
<label className="">
|
||||
<div className="mb-4">
|
||||
<label className="mb-2">
|
||||
<b>Nama Lengkap</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input type="text" autoComplete="off" className={` ${errors.firstName ? "block" : ""}`} {...register("firstName")} placeholder="Masukan Nama Lengkap Anda" />
|
||||
<div className="text-red-500">{errors.firstName?.message}</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label className="">
|
||||
<div className="mb-4">
|
||||
<label className="mb-2">
|
||||
<b>Username</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input
|
||||
|
|
@ -766,30 +765,30 @@ const page = () => {
|
|||
/>
|
||||
<div className="text-red-500">{errors.username?.message}</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label className="">
|
||||
<div className="mb-4">
|
||||
<label className="mb-2">
|
||||
<b>Email</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input type="email" autoComplete="off" className={` ${errors.email ? "block" : ""}`} {...register("email")} placeholder="Masukan Email Anda" disabled />
|
||||
<div className="text-red-500">{errors.email?.message}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label className="form-label">
|
||||
<div className="flex flex-col">
|
||||
<label className="mb-2">
|
||||
<b>No. HP</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="number" autoComplete="off" className={` ${errors.phoneNumber ? "block" : ""}`} {...register("phoneNumber")} placeholder="Masukan Nomor Telepon Anda" />
|
||||
<Input type="number" autoComplete="off" className={` ${errors.phoneNumber ? "block" : ""}`} {...register("phoneNumber")} placeholder="Masukan Nomor Telepon Anda" />
|
||||
<div className="text-red-500">{errors.phoneNumber?.message}</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label htmlFor="address" className="">
|
||||
<div className="mb-4">
|
||||
<label htmlFor="address" className="mb-2">
|
||||
<b>Alamat</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Textarea className={`form-control ${errors.address ? "block" : ""}`} {...register("address")} placeholder="Masukan Alamat Lengkap Anda" rows={3} />
|
||||
<div className="text-red-500">{errors.address?.message}</div>
|
||||
</div>
|
||||
{Number(category) == 6 ? (
|
||||
<div>
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="">
|
||||
<label htmlFor="provinsi">
|
||||
<b>Pilih Institusi</b> <span className="text-red-500">*</span>
|
||||
|
|
@ -818,10 +817,10 @@ const page = () => {
|
|||
: {}
|
||||
}
|
||||
>
|
||||
<label htmlFor="alamat" className="">
|
||||
<label htmlFor="alamat" className="mb-2">
|
||||
<b>Nama Institusi</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input className="" autoComplete="off" placeholder="Masukan Nama Lengkap Institusi Anda" type="text" onChange={(event) => setCustomInstituteName(event.target.value)} />
|
||||
<Input className="" autoComplete="off" placeholder="Masukan Nama Lengkap Institusi Anda" type="text" onChange={(event) => setCustomInstituteName(event.target.value)} />
|
||||
</div>
|
||||
<div className="">
|
||||
<label htmlFor="alamat" className="">
|
||||
|
|
@ -833,8 +832,8 @@ const page = () => {
|
|||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="">
|
||||
<label htmlFor="provinsi">
|
||||
<div className="flex flex-col">
|
||||
<label htmlFor="provinsi" className="mb-2">
|
||||
<b>Provinsi</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<select className={` ${errors.provinsi ? "block" : ""}`} {...register("provinsi")} id="provinsi" name="provinsi" onChange={(event) => getCity(event.target.value)}>
|
||||
|
|
@ -849,8 +848,8 @@ const page = () => {
|
|||
</select>
|
||||
<div className="text-red-500">{errors.provinsi?.message}</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label htmlFor="kota">
|
||||
<div className="flex flex-col">
|
||||
<label htmlFor="kota" className="mb-2">
|
||||
<b>Kota/Kabupaten</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<select className={` ${errors.kota ? "block" : ""}`} {...register("kota")} id="kota" onChange={(event) => getDistricts(event.target.value)}>
|
||||
|
|
@ -865,8 +864,8 @@ const page = () => {
|
|||
</select>
|
||||
<div className="text-red-500">{errors.kota?.message}</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label htmlFor="kecamatan">
|
||||
<div className="flex flex-col">
|
||||
<label htmlFor="kecamatan" className="mb-2">
|
||||
<b>Kecamatan</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<select className={` ${errors.kecamatan ? "block" : ""}`} {...register("kecamatan")} id="kecamatan">
|
||||
|
|
@ -881,8 +880,8 @@ const page = () => {
|
|||
</select>
|
||||
<div className="text-red-500">{errors.kecamatan?.message}</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<label htmlFor="password" className="">
|
||||
<div className="flex flex-col">
|
||||
<label htmlFor="password" className="mb-2">
|
||||
<b>Kata Sandi</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input
|
||||
|
|
@ -910,11 +909,11 @@ const page = () => {
|
|||
<Icon icon="fa:eye-slash" />
|
||||
</a>
|
||||
</div>
|
||||
<div className="">
|
||||
<label htmlFor="password" className="">
|
||||
<div className="flex flex-col">
|
||||
<label htmlFor="password" className="mb-2">
|
||||
<b>Konfirmasi Kata Sandi</b> <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
<Input
|
||||
type={typePassConf}
|
||||
autoComplete="off"
|
||||
className={` ${errors.passwordConf ? "block" : ""}`}
|
||||
|
|
@ -982,7 +981,14 @@ const page = () => {
|
|||
</p>
|
||||
</div>
|
||||
<div className={`mb-5 mt-7 w-full text-center flex justify-center ${formProfile == true || stepTwoActive ? "hidden" : ""}`}>
|
||||
<a className="border cursor-pointer border-red-500 px-4 py-3 rounded-lg text-white bg-[#dc3545] w-full" onClick={() => handleSendOTP()}>
|
||||
{/* <a className="border cursor-pointer border-red-500 px-4 py-3 rounded-lg text-white bg-[#dc3545] w-full" onClick={() => handleSendOTP()}> */}
|
||||
<a
|
||||
className="border cursor-pointer border-red-500 px-4 py-3 rounded-lg text-white bg-[#dc3545] w-[400px]"
|
||||
onClick={() => {
|
||||
setStepOneActive(false);
|
||||
setStepTwoActive(true);
|
||||
}}
|
||||
>
|
||||
Kirim OTP
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { Link } from "@/i18n/routing";
|
|||
import { Reveal } from "./Reveal";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
const NewContent = (props: { group: string, type: string }) => {
|
||||
const NewContent = (props: { group: string; type: string }) => {
|
||||
const [newContent, setNewContent] = useState<any>();
|
||||
const [selectedTab, setSelectedTab] = useState("image");
|
||||
const router = useRouter();
|
||||
|
|
@ -33,10 +33,8 @@ const NewContent = (props: { group: string, type: string }) => {
|
|||
size: 5,
|
||||
sortBy: props.type == "popular" ? "clickCount" : "createdAt",
|
||||
contentTypeId: selectedTab == "image" ? "1" : selectedTab == "video" ? "2" : selectedTab == "text" ? "3" : selectedTab == "audio" ? "4" : "",
|
||||
group: props.group == "mabes" ? "" :
|
||||
props.group == "polda" && poldaName && String(poldaName)?.length > 1 ? poldaName :
|
||||
props.group == "satker" && satkerName && String(satkerName)?.length > 1 ? "satker-"+satkerName : "",
|
||||
isInt: locale == "en" ? true : false
|
||||
group: props.group == "mabes" ? "" : props.group == "polda" && poldaName && String(poldaName)?.length > 1 ? poldaName : props.group == "satker" && satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "",
|
||||
isInt: locale == "en" ? true : false,
|
||||
};
|
||||
const response = await getListContent(request);
|
||||
console.log("category", response);
|
||||
|
|
|
|||
|
|
@ -344,7 +344,9 @@
|
|||
"profile": "Profile",
|
||||
"contentManagement": "Content Management",
|
||||
"live": "Live",
|
||||
"notFound": "Not Found"
|
||||
"notFound": "Not Found",
|
||||
"titleSchedule": "Input schedule title",
|
||||
"scheduleToday": ""
|
||||
},
|
||||
"FilterPage": {
|
||||
"image": "Image",
|
||||
|
|
|
|||
|
|
@ -344,7 +344,8 @@
|
|||
"live": "Live",
|
||||
"seeLess": "Lihat Lebih Sedikit",
|
||||
"notFound": "Tidak Ditemukan",
|
||||
"division": "Satker"
|
||||
"division": "Satker",
|
||||
"titleSchedule": "Masukkan judul Jadwal"
|
||||
},
|
||||
"FilterPage": {
|
||||
"image": "Foto",
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
import qs from "qs";
|
||||
import { getAPIDummy } from "./http-config/axiosCustom";
|
||||
import { httpGet, httpPost } from "./http-config/http-base-service";
|
||||
import {
|
||||
httpGetInterceptor,
|
||||
httpGetInterceptorWithToken,
|
||||
httpPostInterceptor,
|
||||
} from "./http-config/http-interceptor-service";
|
||||
import { httpGetInterceptor, httpGetInterceptorWithToken, httpPostInterceptor } from "./http-config/http-interceptor-service";
|
||||
|
||||
export async function login(data: any) {
|
||||
const pathUrl = "signin";
|
||||
const headers = {
|
||||
'accept': 'application/json',
|
||||
'content-type': 'application/json',
|
||||
accept: "application/json",
|
||||
"content-type": "application/json",
|
||||
};
|
||||
return httpPost(pathUrl, headers, data);
|
||||
}
|
||||
|
|
@ -27,7 +23,7 @@ export async function login(data: any) {
|
|||
// 'X-XSRF-TOKEN': csrfToken || ''
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// if (!response.ok) {
|
||||
// throw new Error(`HTTP error! status: ${response.status}`);
|
||||
// }
|
||||
|
|
@ -38,18 +34,18 @@ export async function login(data: any) {
|
|||
// }
|
||||
|
||||
export async function getCsrfToken() {
|
||||
const pathUrl = "csrf";
|
||||
const headers = {
|
||||
'content-type': 'application/json',
|
||||
};
|
||||
return httpGet(pathUrl, headers);
|
||||
const pathUrl = "csrf";
|
||||
const headers = {
|
||||
"content-type": "application/json",
|
||||
};
|
||||
return httpGet(pathUrl, headers);
|
||||
// const url = 'https://netidhub.com/api/csrf';
|
||||
// try {
|
||||
// const response = await fetch(url, {
|
||||
// method: 'GET',
|
||||
// credentials: 'include'
|
||||
// });
|
||||
|
||||
|
||||
// if (!response.ok) {
|
||||
// throw new Error(`HTTP error! status: ${response.status}`);
|
||||
// }
|
||||
|
|
@ -122,10 +118,10 @@ export async function getDataByNRP(reqid: any, nrp: any) {
|
|||
|
||||
export async function getDataJournalist(cert: any) {
|
||||
const url = `public/users/search-journalist?cert=${cert}`;
|
||||
return httpGetInterceptor({ url });
|
||||
return httpGetInterceptor(url);
|
||||
}
|
||||
|
||||
export async function getDataPersonil(nrp: any) {
|
||||
const url = `public/users/search-personil?nrp=${nrp}`;
|
||||
return httpGetInterceptor({ url });
|
||||
return httpGetInterceptor(url);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue