|
|
@ -29,7 +29,12 @@ export const Ticket = ({ |
|
|
|
setDialog, |
|
|
|
setDialog, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
|
let opt = useMemo( |
|
|
|
let opt = useMemo( |
|
|
|
() => ["واحد مورد نظر", "واحد فروش", "واحد فنی", "واحد محتوایی"], |
|
|
|
() => [ |
|
|
|
|
|
|
|
window.t("واحد مورد نظر"), |
|
|
|
|
|
|
|
window.t("واحد فروش"), |
|
|
|
|
|
|
|
window.t("واحد فنی"), |
|
|
|
|
|
|
|
window.t("واحد محتوایی"), |
|
|
|
|
|
|
|
], |
|
|
|
[status] |
|
|
|
[status] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -50,7 +55,7 @@ export const Ticket = ({ |
|
|
|
const send = useCallback(async () => { |
|
|
|
const send = useCallback(async () => { |
|
|
|
if (!ticket?.subject) { |
|
|
|
if (!ticket?.subject) { |
|
|
|
setDialog({ |
|
|
|
setDialog({ |
|
|
|
text: "موضوع پیام خود را وارد کنید.", |
|
|
|
text: window.t("موضوع پیام خود را وارد کنید."), |
|
|
|
type: "alert", |
|
|
|
type: "alert", |
|
|
|
accept: () => {}, |
|
|
|
accept: () => {}, |
|
|
|
open: true, |
|
|
|
open: true, |
|
|
@ -60,7 +65,7 @@ export const Ticket = ({ |
|
|
|
// console.log("mahdi");
|
|
|
|
// console.log("mahdi");
|
|
|
|
} else if (!ticket?.unit) { |
|
|
|
} else if (!ticket?.unit) { |
|
|
|
setDialog({ |
|
|
|
setDialog({ |
|
|
|
text: "واحد مورد نظر خود را وارد نکرده اید.", |
|
|
|
text: window.t("واحد مورد نظر خود را وارد نکرده اید."), |
|
|
|
type: "alert", |
|
|
|
type: "alert", |
|
|
|
accept: () => {}, |
|
|
|
accept: () => {}, |
|
|
|
open: true, |
|
|
|
open: true, |
|
|
@ -115,7 +120,7 @@ export const Ticket = ({ |
|
|
|
backgroundColor={isDark ? "dark:bg-transparent dark:text-white" : ""} |
|
|
|
backgroundColor={isDark ? "dark:bg-transparent dark:text-white" : ""} |
|
|
|
fill={isDark ? "fill-white" : "fill-gray-600"} |
|
|
|
fill={isDark ? "fill-white" : "fill-gray-600"} |
|
|
|
/> |
|
|
|
/> |
|
|
|
{ticket?.unit === "واحد محتوایی" && ( |
|
|
|
{ticket?.unit === window.t("1400/11/24") && ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<div className="mt-2"></div> |
|
|
|
<div className="mt-2"></div> |
|
|
|
<Select |
|
|
|
<Select |
|
|
@ -124,7 +129,7 @@ export const Ticket = ({ |
|
|
|
...new Set( |
|
|
|
...new Set( |
|
|
|
myProductList?.map((item) => [ |
|
|
|
myProductList?.map((item) => [ |
|
|
|
item?.product?.book?.id, |
|
|
|
item?.product?.book?.id, |
|
|
|
`${item?.product?.book.name} پایه ${ |
|
|
|
`${item?.product?.book.name} {window.t("پایه")} ${ |
|
|
|
Object.values(grades)[item.product.book.gradeId] |
|
|
|
Object.values(grades)[item.product.book.gradeId] |
|
|
|
}`,
|
|
|
|
}`,
|
|
|
|
]) || [] |
|
|
|
]) || [] |
|
|
@ -145,10 +150,10 @@ export const Ticket = ({ |
|
|
|
onChange={(name, value) => setTicket({ name, value })} |
|
|
|
onChange={(name, value) => setTicket({ name, value })} |
|
|
|
value={ticket?.subject || ""} |
|
|
|
value={ticket?.subject || ""} |
|
|
|
regex={(val) => val} |
|
|
|
regex={(val) => val} |
|
|
|
label="موضوع" |
|
|
|
placeholder={window.t("موضوع")} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Textarea |
|
|
|
<Textarea |
|
|
|
placeholder="پیام خود را اینجا بنویسید" |
|
|
|
placeholder={window.t("پیام خود را اینجا بنویسید")} |
|
|
|
name="text" |
|
|
|
name="text" |
|
|
|
onChange={(name, value) => setTicket({ name, value })} |
|
|
|
onChange={(name, value) => setTicket({ name, value })} |
|
|
|
value={ticket?.text || ""} |
|
|
|
value={ticket?.text || ""} |
|
|
@ -161,7 +166,7 @@ export const Ticket = ({ |
|
|
|
/> |
|
|
|
/> |
|
|
|
<br /> |
|
|
|
<br /> |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
title="ارسال پیام" |
|
|
|
placeholder={window.t("ارسال پیام")} |
|
|
|
backgroundColor={isDark ? "bg-blueC0" : "bg-blueC0"} |
|
|
|
backgroundColor={isDark ? "bg-blueC0" : "bg-blueC0"} |
|
|
|
border={{ color: isDark ? "#ffffff55" : "#196EC055", width: "0px" }} |
|
|
|
border={{ color: isDark ? "#ffffff55" : "#196EC055", width: "0px" }} |
|
|
|
width="100%" |
|
|
|
width="100%" |
|
|
|