feat: merge rama
This commit is contained in:
commit
aa48619491
|
|
@ -0,0 +1,95 @@
|
||||||
|
"use client";
|
||||||
|
import SiteBreadcrumb from "@/components/site-breadcrumb";
|
||||||
|
import { Progress } from "@/components/ui/progress";
|
||||||
|
import { getUserFeedbacks } from "@/service/master/faq";
|
||||||
|
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||||
|
import { stringify } from "querystring";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
export default function UserFeedback() {
|
||||||
|
const [listData, setListData] = useState<any>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
initState();
|
||||||
|
}, []);
|
||||||
|
async function initState() {
|
||||||
|
const response = await getUserFeedbacks();
|
||||||
|
console.log("ssss", response?.data?.data);
|
||||||
|
setListData(response?.data?.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderStar = (count: number) => {
|
||||||
|
const mapped = [1, 2, 3, 4, 5];
|
||||||
|
return (
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
{mapped?.map((row) =>
|
||||||
|
row < count + 1 ? (
|
||||||
|
<Icon key={row} icon="emojione:star" width={33} />
|
||||||
|
) : (
|
||||||
|
<Icon key={row} icon="emojione-monotone:star" width={33} />
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<SiteBreadcrumb />
|
||||||
|
<div className="flex flex-col gap-2 bg-white p-4">
|
||||||
|
<p className="text-lg">Hasil Feedback</p>
|
||||||
|
<div className="grid grid-cols-2 gap-5">
|
||||||
|
{listData?.map(
|
||||||
|
(list: any) =>
|
||||||
|
list?.avgScore !== "NaN" && (
|
||||||
|
<div
|
||||||
|
key={list?.id}
|
||||||
|
className="flex flex-col gap-2 bg-gray-100 rounded-md p-5"
|
||||||
|
>
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
<p className="text-3xl">{parseInt(list?.avgScore)}</p>
|
||||||
|
{renderStar(parseInt(list?.avgScore))}
|
||||||
|
</div>
|
||||||
|
<p className="font-semibold">{list?.question}</p>
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
<p className="w-[120px]">Penilaian 5</p>
|
||||||
|
<Progress
|
||||||
|
value={parseInt(list?.score5)}
|
||||||
|
className="w-[70%]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
<p className="w-[120px]">Penilaian 4</p>
|
||||||
|
<Progress
|
||||||
|
value={parseInt(list?.score4)}
|
||||||
|
className="w-[70%]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
<p className="w-[120px]">Penilaian 3</p>
|
||||||
|
<Progress
|
||||||
|
value={parseInt(list?.score3)}
|
||||||
|
className="w-[70%]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
<p className="w-[120px]">Penilaian 2</p>
|
||||||
|
<Progress
|
||||||
|
value={parseInt(list?.score2)}
|
||||||
|
className="w-[70%]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row gap-3 items-center">
|
||||||
|
<p className="w-[120px]">Penilaian 1</p>
|
||||||
|
<Progress
|
||||||
|
value={parseInt(list?.score1)}
|
||||||
|
className="w-[70%]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -69,7 +69,10 @@ export default function CollaborationPage() {
|
||||||
loading();
|
loading();
|
||||||
const response = await deleteCollabDiscussion(dataId);
|
const response = await deleteCollabDiscussion(dataId);
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
toast({
|
||||||
|
title: "Sukses hapus",
|
||||||
|
});
|
||||||
|
setReplyValue("");
|
||||||
close();
|
close();
|
||||||
initState();
|
initState();
|
||||||
}
|
}
|
||||||
|
|
@ -79,7 +82,7 @@ export default function CollaborationPage() {
|
||||||
loading();
|
loading();
|
||||||
const data = {
|
const data = {
|
||||||
ticketId: id,
|
ticketId: id,
|
||||||
replyValue,
|
message: replyValue,
|
||||||
parentId: null,
|
parentId: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,14 +100,6 @@ const columns: ColumnDef<any>[] = [
|
||||||
View
|
View
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
|
||||||
<SquarePen className="w-4 h-4 me-1.5" />
|
|
||||||
Edit
|
|
||||||
</DropdownMenuItem>
|
|
||||||
<DropdownMenuItem className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none">
|
|
||||||
<Trash2 className="w-4 h-4 me-1.5" />
|
|
||||||
Delete
|
|
||||||
</DropdownMenuItem>
|
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ import {
|
||||||
saveTicketInternalReply,
|
saveTicketInternalReply,
|
||||||
} from "@/service/communication/communication";
|
} from "@/service/communication/communication";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||||
|
import { Link } from "@/i18n/routing";
|
||||||
|
|
||||||
const taskSchema = z.object({
|
const taskSchema = z.object({
|
||||||
title: z.string().min(1, { message: "Judul diperlukan" }),
|
title: z.string().min(1, { message: "Judul diperlukan" }),
|
||||||
|
|
@ -34,33 +36,6 @@ const taskSchema = z.object({
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type escalationDetail = {
|
|
||||||
id: number;
|
|
||||||
title: string;
|
|
||||||
createdAt: string;
|
|
||||||
commentFromUserName: string;
|
|
||||||
message: string;
|
|
||||||
createdBy: {
|
|
||||||
id: number;
|
|
||||||
fullname: string;
|
|
||||||
};
|
|
||||||
sendTo: {
|
|
||||||
id: number;
|
|
||||||
fullname: string;
|
|
||||||
};
|
|
||||||
status: {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
priority: {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
description: string;
|
|
||||||
narration: string;
|
|
||||||
is_active: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type replyDetail = {
|
export type replyDetail = {
|
||||||
id: number;
|
id: number;
|
||||||
message: string;
|
message: string;
|
||||||
|
|
@ -79,7 +54,7 @@ export default function FormDetailEscalation() {
|
||||||
const MySwal = withReactContent(Swal);
|
const MySwal = withReactContent(Swal);
|
||||||
const { id } = useParams() as { id: string };
|
const { id } = useParams() as { id: string };
|
||||||
|
|
||||||
const [detail, setDetail] = useState<escalationDetail>();
|
const [detail, setDetail] = useState<any>();
|
||||||
const [ticketReply, setTicketReply] = useState<replyDetail[]>([]);
|
const [ticketReply, setTicketReply] = useState<replyDetail[]>([]);
|
||||||
const [replyVisible, setReplyVisible] = useState(false);
|
const [replyVisible, setReplyVisible] = useState(false);
|
||||||
const [replyMessage, setReplyMessage] = useState("");
|
const [replyMessage, setReplyMessage] = useState("");
|
||||||
|
|
@ -165,40 +140,54 @@ export default function FormDetailEscalation() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<div>
|
||||||
<div className="px-6 py-6">
|
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<div className="flex flex-col mt-6 w-full mb-3">
|
<div className="flex flex-col mt-6 w-full mb-3">
|
||||||
{detail !== undefined && (
|
{detail !== undefined && (
|
||||||
<div key={detail?.id} className="bg-slate-300 rounded-md">
|
<div key={detail?.id} className="bg-slate-300 rounded-md">
|
||||||
<p className="px-3 py-3 bg-slate-300 rounded-md text-lg font-semibold">
|
<p className="p-5 bg-slate-300 rounded-md text-lg font-semibold">
|
||||||
Ticket #{detail.id}
|
Ticket #{detail.id}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-row gap-3 mt-3 bg-blue-300 py-2 px-2">
|
<div className="flex flex-row gap-3 bg-sky-100 p-5 items-center">
|
||||||
<Avatar>
|
<Icon icon="qlementine-icons:user-16" width={36} />
|
||||||
<AvatarImage
|
|
||||||
src={"/images/avatar/avatar-3.png"}
|
|
||||||
alt={`mabes`}
|
|
||||||
/>
|
|
||||||
</Avatar>
|
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
<span className="font-bold">
|
<span className="font-bold">
|
||||||
{detail?.commentFromUserName}
|
{detail?.commentFromUserName}
|
||||||
</span>{" "}
|
</span>
|
||||||
mengirimkan pesan untuk{" "}
|
{` `}
|
||||||
<span className="font-bold">{detail?.message}</span>
|
mengirimkan pesan untuk{` `}
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
detail?.feed
|
||||||
|
? detail?.feed?.permalink_url == undefined
|
||||||
|
? detail?.feedUrl
|
||||||
|
: detail?.feed?.permalink_url
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
target="_blank"
|
||||||
|
className="font-bold"
|
||||||
|
>
|
||||||
|
{detail?.message}
|
||||||
|
</Link>
|
||||||
|
</p>
|
||||||
|
<p className="text-xs">
|
||||||
|
{`${new Date(detail?.createdAt).getDate()}-${
|
||||||
|
new Date(detail?.createdAt).getMonth() + 1
|
||||||
|
}-${new Date(detail?.createdAt).getFullYear()} ${new Date(
|
||||||
|
detail?.createdAt
|
||||||
|
).getHours()}:${new Date(detail?.createdAt).getMinutes()}`}
|
||||||
</p>
|
</p>
|
||||||
<p>{detail?.createdAt}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="pl-3 bg-white">{detail.message}</p>
|
<p className="p-5 bg-white">{detail.message}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{detail !== undefined && (
|
{detail !== undefined && (
|
||||||
<div className="gap-5 mb-5 w-full border mt-3 rounded-md">
|
<div className="gap-5 mb-5 w-full border mt-3 rounded-md bg-white">
|
||||||
<div className="space-y-2 px-3 mt-3">
|
<div className="space-y-2 px-3 mt-3">
|
||||||
<Label>Judul</Label>
|
<Label>Judul</Label>
|
||||||
<Controller
|
<Controller
|
||||||
|
|
@ -280,6 +269,5 @@ export default function FormDetailEscalation() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import {
|
||||||
getTicketingInternalDiscussion,
|
getTicketingInternalDiscussion,
|
||||||
saveTicketInternalReply,
|
saveTicketInternalReply,
|
||||||
} from "@/service/communication/communication";
|
} from "@/service/communication/communication";
|
||||||
|
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||||
|
|
||||||
const taskSchema = z.object({
|
const taskSchema = z.object({
|
||||||
title: z.string().min(1, { message: "Judul diperlukan" }),
|
title: z.string().min(1, { message: "Judul diperlukan" }),
|
||||||
|
|
@ -36,6 +37,7 @@ export type taskDetail = {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
|
referenceNumber: string | number;
|
||||||
createdBy: {
|
createdBy: {
|
||||||
id: number;
|
id: number;
|
||||||
fullname: string;
|
fullname: string;
|
||||||
|
|
@ -161,8 +163,7 @@ export default function FormDetailInternal() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<div className="py-5">
|
||||||
<div className="px-6 py-6">
|
|
||||||
<div className="mt-4 flex flex-row items-center gap-3">
|
<div className="mt-4 flex flex-row items-center gap-3">
|
||||||
<Button onClick={handleReply} color="default" variant={"outline"}>
|
<Button onClick={handleReply} color="default" variant={"outline"}>
|
||||||
Balas
|
Balas
|
||||||
|
|
@ -173,9 +174,10 @@ export default function FormDetailInternal() {
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row gap-5 mt-5">
|
||||||
|
<div className="flex flex-col w-[70%]">
|
||||||
{replyVisible && (
|
{replyVisible && (
|
||||||
<div className="mt-4">
|
<div className="">
|
||||||
<Label htmlFor="replyMessage">Tulis Pesan</Label>
|
|
||||||
<textarea
|
<textarea
|
||||||
id="replyMessage"
|
id="replyMessage"
|
||||||
className="w-full h-24 border rounded-md p-2"
|
className="w-full h-24 border rounded-md p-2"
|
||||||
|
|
@ -183,7 +185,7 @@ export default function FormDetailInternal() {
|
||||||
onChange={(e) => setReplyMessage(e.target.value)}
|
onChange={(e) => setReplyMessage(e.target.value)}
|
||||||
placeholder="Tulis pesan di sini..."
|
placeholder="Tulis pesan di sini..."
|
||||||
/>
|
/>
|
||||||
<div className="flex justify-end gap-3 mt-2">
|
<div className="flex justify-end gap-3 my-2">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => setReplyVisible(false)}
|
onClick={() => setReplyVisible(false)}
|
||||||
color="default"
|
color="default"
|
||||||
|
|
@ -197,40 +199,41 @@ export default function FormDetailInternal() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-row justify-between ">
|
<div className="border rounded-t-xl">
|
||||||
<div className="flex flex-col mt-6 w-7/12">
|
<p className="p-4 bg-slate-300 rounded-t-xl text-lg font-semibold">
|
||||||
{ticketReply?.map((list) => (
|
Ticket #{detail?.referenceNumber}
|
||||||
<div key={list.id} className="bg-slate-300 rounded-md border">
|
|
||||||
<p className="px-3 pt-3 bg-slate-300 rounded-md text-lg font-semibold">
|
|
||||||
Ticket #{list.id}
|
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-row gap-3 mt-3 bg-blue-300 py-2 px-2">
|
{ticketReply?.map((list) => (
|
||||||
<Avatar>
|
<div key={list.id} className="flex flex-col">
|
||||||
<AvatarImage
|
<div className="flex flex-row gap-3 bg-sky-100 p-4 items-center">
|
||||||
src={"/images/avatar/avatar-3.png"}
|
<Icon icon="qlementine-icons:user-16" width={36} />
|
||||||
alt={`mabes`}
|
|
||||||
/>
|
|
||||||
</Avatar>
|
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
<span className="font-bold">
|
<span className="font-bold text-sm">
|
||||||
{list?.messageFrom?.fullname}
|
{list?.messageFrom?.fullname}
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
mengirimkan pesan untuk{" "}
|
mengirimkan pesan untuk{" "}
|
||||||
<span className="font-bold">
|
<span className="font-bold text-sm">
|
||||||
{list?.messageTo?.fullname}
|
{list?.messageTo?.fullname}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>{list?.createdAt}</p>
|
<p className="text-xs">
|
||||||
|
{`${new Date(list?.createdAt).getDate()}-${
|
||||||
|
new Date(list?.createdAt).getMonth() + 1
|
||||||
|
}-${new Date(list?.createdAt).getFullYear()} ${new Date(
|
||||||
|
list?.createdAt
|
||||||
|
).getHours()}:${new Date(list?.createdAt).getMinutes()}`}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="pl-3 bg-white py-2">{list.message}</p>
|
<p className="p-4 bg-white text-sm">{list.message}</p>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{detail !== undefined && (
|
{detail !== undefined && (
|
||||||
<div className="gap-5 mb-5 w-3/12 border mt-3 rounded-md">
|
<div className="gap-5 mb-5 w-[30%] border bg-white rounded-md">
|
||||||
<Label className="ml-3 mt-3">Properties</Label>
|
<p className="mx-3 mt-3">Properties</p>
|
||||||
<div className="space-y-2 px-3">
|
<div className="space-y-2 px-3">
|
||||||
<Label>Judul</Label>
|
<Label>Judul</Label>
|
||||||
<Controller
|
<Controller
|
||||||
|
|
@ -287,6 +290,5 @@ export default function FormDetailInternal() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ import {
|
||||||
saveTicketInternalReply,
|
saveTicketInternalReply,
|
||||||
} from "@/service/communication/communication";
|
} from "@/service/communication/communication";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
import { htmlToString } from "@/utils/globals";
|
||||||
|
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||||
|
|
||||||
const taskSchema = z.object({
|
const taskSchema = z.object({
|
||||||
// description: z.string().min(2, {
|
// description: z.string().min(2, {
|
||||||
|
|
@ -33,30 +35,6 @@ const taskSchema = z.object({
|
||||||
// }),
|
// }),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type taskDetail = {
|
|
||||||
id: number;
|
|
||||||
title: string;
|
|
||||||
createdAt: string;
|
|
||||||
createdBy: {
|
|
||||||
id: number;
|
|
||||||
fullname: string;
|
|
||||||
};
|
|
||||||
sendTo: {
|
|
||||||
id: number;
|
|
||||||
fullname: string;
|
|
||||||
};
|
|
||||||
status: {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
priority: {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
description: string;
|
|
||||||
is_active: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type replyDetail = {
|
export type replyDetail = {
|
||||||
id: number;
|
id: number;
|
||||||
message: string;
|
message: string;
|
||||||
|
|
@ -76,13 +54,14 @@ export default function FormEditInternal() {
|
||||||
const { id } = useParams() as { id: string };
|
const { id } = useParams() as { id: string };
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const [detail, setDetail] = useState<taskDetail>();
|
const [detail, setDetail] = useState<any>();
|
||||||
const [ticketReply, setTicketReply] = useState<replyDetail[]>([]);
|
const [ticketReply, setTicketReply] = useState<replyDetail[]>([]);
|
||||||
const [replyVisible, setReplyVisible] = useState(false);
|
const [replyVisible, setReplyVisible] = useState(false);
|
||||||
const [replyMessage, setReplyMessage] = useState("");
|
const [replyMessage, setReplyMessage] = useState("");
|
||||||
const [selectedPriority, setSelectedPriority] = useState("");
|
const [selectedPriority, setSelectedPriority] = useState("");
|
||||||
const [selectedStatus, setSelectedStatus] = useState("");
|
const [selectedStatus, setSelectedStatus] = useState("");
|
||||||
const [selectedTarget, setSelectedTarget] = useState("");
|
const [selectedTarget, setSelectedTarget] = useState("");
|
||||||
|
const [description, setDescription] = useState("");
|
||||||
type TaskSchema = z.infer<typeof taskSchema>;
|
type TaskSchema = z.infer<typeof taskSchema>;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|
@ -98,6 +77,10 @@ export default function FormEditInternal() {
|
||||||
if (id) {
|
if (id) {
|
||||||
const response = await getTicketingInternalDetail(id);
|
const response = await getTicketingInternalDetail(id);
|
||||||
setDetail(response?.data?.data);
|
setDetail(response?.data?.data);
|
||||||
|
setSelectedPriority(response?.data?.data?.priority?.name);
|
||||||
|
console.log("sadad", response?.data?.data);
|
||||||
|
setSelectedStatus(response?.data?.data?.status?.name);
|
||||||
|
setDescription(htmlToString(response?.data?.data?.message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initState();
|
initState();
|
||||||
|
|
@ -206,8 +189,7 @@ export default function FormEditInternal() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<div className="py-5">
|
||||||
<div className="px-6 py-6">
|
|
||||||
<div className="mt-4 flex flex-row items-center gap-3">
|
<div className="mt-4 flex flex-row items-center gap-3">
|
||||||
<Button onClick={handleReply} color="default" variant={"outline"}>
|
<Button onClick={handleReply} color="default" variant={"outline"}>
|
||||||
Balas
|
Balas
|
||||||
|
|
@ -218,9 +200,10 @@ export default function FormEditInternal() {
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row gap-5 mt-5">
|
||||||
|
<div className="flex flex-col w-[70%]">
|
||||||
{replyVisible && (
|
{replyVisible && (
|
||||||
<div className="mt-4">
|
<div>
|
||||||
<Label htmlFor="replyMessage">Tulis Pesan</Label>
|
|
||||||
<textarea
|
<textarea
|
||||||
id="replyMessage"
|
id="replyMessage"
|
||||||
className="w-full h-24 border rounded-md p-2"
|
className="w-full h-24 border rounded-md p-2"
|
||||||
|
|
@ -242,20 +225,15 @@ export default function FormEditInternal() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-row justify-between ">
|
<div className="border rounded-t-xl">
|
||||||
<div className="flex flex-col mt-6 w-7/12">
|
<p className="p-4 bg-slate-300 rounded-t-xl text-lg font-semibold">
|
||||||
{ticketReply?.map((list) => (
|
Ticket #{detail?.referenceNumber}
|
||||||
<div key={list.id} className="bg-slate-300 rounded-md border">
|
|
||||||
<p className="px-3 pt-3 bg-slate-300 rounded-md text-lg font-semibold">
|
|
||||||
Ticket #{list.id}
|
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-row gap-3 mt-3 bg-blue-300 py-2 px-2">
|
{ticketReply?.map((list) => (
|
||||||
<Avatar>
|
<div key={list.id} className="flex flex-col">
|
||||||
<AvatarImage
|
<div className="flex flex-row gap-3 bg-sky-100 p-4 items-center">
|
||||||
src={"/images/avatar/avatar-3.png"}
|
<Icon icon="qlementine-icons:user-16" width={36} />
|
||||||
alt={`mabes`}
|
|
||||||
/>
|
|
||||||
</Avatar>
|
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
<span className="font-bold">
|
<span className="font-bold">
|
||||||
|
|
@ -266,17 +244,26 @@ export default function FormEditInternal() {
|
||||||
{list?.messageTo?.fullname}
|
{list?.messageTo?.fullname}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>{list?.createdAt}</p>
|
<p className="text-xs">{`${new Date(
|
||||||
|
list?.createdAt
|
||||||
|
).getDate()}-${
|
||||||
|
new Date(list?.createdAt).getMonth() + 1
|
||||||
|
}-${new Date(list?.createdAt).getFullYear()} ${new Date(
|
||||||
|
list?.createdAt
|
||||||
|
).getHours()}:${new Date(
|
||||||
|
list?.createdAt
|
||||||
|
).getMinutes()}`}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="pl-3 bg-white py-2">{list.message}</p>
|
<p className="pl-3 bg-white py-2">{list.message}</p>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{detail !== undefined && (
|
{detail !== undefined && (
|
||||||
<form onSubmit={handleSubmit(onSubmit)}>
|
<form onSubmit={handleSubmit(onSubmit)} className="w-[30%]">
|
||||||
<div className="gap-5 mb-5 w-full border mt-3 rounded-md">
|
<div className="gap-5 mb-5 border bg-white rounded-xl">
|
||||||
<Label className="ml-3 mt-3">Properties</Label>
|
<p className="mx-3 mt-3">Properties</p>
|
||||||
<div className="space-y-2 px-3">
|
<div className="space-y-2 px-3">
|
||||||
<Label>Judul</Label>
|
<Label>Judul</Label>
|
||||||
<Controller
|
<Controller
|
||||||
|
|
@ -302,7 +289,7 @@ export default function FormEditInternal() {
|
||||||
<Label>Prioritas</Label>
|
<Label>Prioritas</Label>
|
||||||
<Select
|
<Select
|
||||||
onValueChange={setSelectedPriority}
|
onValueChange={setSelectedPriority}
|
||||||
value={detail?.priority?.name}
|
value={selectedPriority}
|
||||||
>
|
>
|
||||||
<SelectTrigger size="md">
|
<SelectTrigger size="md">
|
||||||
<SelectValue placeholder="Pilih" />
|
<SelectValue placeholder="Pilih" />
|
||||||
|
|
@ -318,35 +305,25 @@ export default function FormEditInternal() {
|
||||||
<Label>Status</Label>
|
<Label>Status</Label>
|
||||||
<Select
|
<Select
|
||||||
onValueChange={setSelectedStatus}
|
onValueChange={setSelectedStatus}
|
||||||
value={detail?.status?.name}
|
value={selectedStatus}
|
||||||
>
|
>
|
||||||
<SelectTrigger size="md">
|
<SelectTrigger size="md">
|
||||||
<SelectValue placeholder="Pilih" />
|
<SelectValue placeholder="Pilih" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="1">Open</SelectItem>
|
<SelectItem value="Open">Open</SelectItem>
|
||||||
<SelectItem value="2">Close</SelectItem>
|
<SelectItem value="Close">Close</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2 px-3">
|
<div className="space-y-2 px-3">
|
||||||
<Label>Description</Label>
|
<Label>Description</Label>
|
||||||
<Controller
|
|
||||||
control={control}
|
|
||||||
name="description"
|
|
||||||
render={({ field }) => (
|
|
||||||
<Textarea
|
<Textarea
|
||||||
value={detail?.description}
|
value={description}
|
||||||
onChange={field.onChange}
|
onChange={(e) => setDescription(e.target.value)}
|
||||||
placeholder="Enter description"
|
placeholder="Enter description"
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
/>
|
|
||||||
{/* {errors.title?.message && (
|
|
||||||
<p className="text-red-400 text-sm">
|
|
||||||
{errors.title.message}
|
|
||||||
</p>
|
|
||||||
)} */}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-end mt-3 mr-3">
|
<div className="flex justify-end mt-3 mr-3">
|
||||||
<Button type="submit" color="primary">
|
<Button type="submit" color="primary">
|
||||||
|
|
@ -358,6 +335,5 @@ export default function FormEditInternal() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
import {
|
import { httpGetInterceptor } from "../http-config/http-interceptor-service";
|
||||||
httpGetInterceptor,
|
|
||||||
} from "../http-config/http-interceptor-service";
|
|
||||||
|
|
||||||
export async function getFaqList() {
|
export async function getFaqList() {
|
||||||
const url = `master/faq/list`;
|
const url = `master/faq/list`;
|
||||||
return httpGetInterceptor(url);
|
return httpGetInterceptor(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getUserFeedbacks() {
|
||||||
|
const url = "feedback/list-all";
|
||||||
|
return httpGetInterceptor(url);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1 @@
|
||||||
#!/bin/sh
|
../typescript/bin/tsc
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %*
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
|
|
@ -1,16 +1 @@
|
||||||
#!/bin/sh
|
../typescript/bin/tsserver
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %*
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
Loading…
Reference in New Issue