Merge branch 'main' of https://gitlab.com/hanifsalafi/mediahub_redesign into prod
This commit is contained in:
commit
0f863281ec
|
|
@ -1869,14 +1869,47 @@ export default function FormAudioDetail() {
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Card>
|
</Card>
|
||||||
{Number(roleId) === 14 ? (
|
{Number(roleId) === 14 ? (
|
||||||
// 🔹 Jika roleId = 14, langsung tampilkan tombol tanpa pengecekan lain
|
|
||||||
<div className="flex flex-col gap-2 p-3">
|
<div className="flex flex-col gap-2 p-3">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => actionApproval("2")}
|
onClick={() => actionApproval("2")}
|
||||||
color="primary"
|
color="primary"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<Icon icon="fa:check" className="mr-3" />{" "}
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("3")}
|
||||||
|
className="bg-orange-400 hover:bg-orange-300"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
||||||
|
{t("revision", { defaultValue: "Revision" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("4")}
|
||||||
|
color="destructive"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:times" className="mr-3" />
|
||||||
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : (Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId) ||
|
||||||
|
(detail?.isInternationalMedia === true &&
|
||||||
|
detail?.isForwardFromNational === true &&
|
||||||
|
Number(detail?.statusId) === 1)) &&
|
||||||
|
(Number(detail?.uploadedById) === Number(userId) ||
|
||||||
|
Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId)) ? (
|
||||||
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("2")}
|
||||||
|
color="primary"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
{t("accept", { defaultValue: "Accept" })}
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -1896,38 +1929,6 @@ export default function FormAudioDetail() {
|
||||||
{t("reject", { defaultValue: "Reject" })}
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
) : Number(detail?.needApprovalFromLevel) ===
|
|
||||||
Number(userLevelId) ? (
|
|
||||||
Number(detail?.uploadedById) === Number(userId) ? (
|
|
||||||
""
|
|
||||||
) : (
|
|
||||||
<div className="flex flex-col gap-2 p-3">
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("2")}
|
|
||||||
color="primary"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:check" className="mr-3" />{" "}
|
|
||||||
{t("accept", { defaultValue: "Accept" })}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("3")}
|
|
||||||
className="bg-orange-400 hover:bg-orange-300"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
|
||||||
{t("revision", { defaultValue: "Revision" })}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("4")}
|
|
||||||
color="destructive"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:times" className="mr-3" />
|
|
||||||
{t("reject", { defaultValue: "Reject" })}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -2127,7 +2127,74 @@ export default function FormImageDetail() {
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{Number(roleId) === 14 ? (
|
{Number(roleId) === 14 ? (
|
||||||
|
// 🔹 Jika roleId = 14 → selalu tampilkan tombol tanpa pengecekan tambahan
|
||||||
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("2")}
|
||||||
|
color="primary"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("3")}
|
||||||
|
className="bg-orange-400 hover:bg-orange-300"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
||||||
|
{t("revision", { defaultValue: "Revision" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("4")}
|
||||||
|
color="destructive"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:times" className="mr-3" />
|
||||||
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : (Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId) ||
|
||||||
|
(detail?.isInternationalMedia === true &&
|
||||||
|
detail?.isForwardFromNational === true &&
|
||||||
|
Number(detail?.statusId) === 1)) &&
|
||||||
|
(Number(detail?.uploadedById) === Number(userId) ||
|
||||||
|
Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId)) ? (
|
||||||
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("2")}
|
||||||
|
color="primary"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("3")}
|
||||||
|
className="bg-orange-400 hover:bg-orange-300"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
||||||
|
{t("revision", { defaultValue: "Revision" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("4")}
|
||||||
|
color="destructive"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:times" className="mr-3" />
|
||||||
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* {Number(roleId) === 14 ? (
|
||||||
// 🔹 Jika roleId = 14 → tampilkan tombol tanpa pengecekan tambahan
|
// 🔹 Jika roleId = 14 → tampilkan tombol tanpa pengecekan tambahan
|
||||||
<div className="flex flex-col gap-2 p-3">
|
<div className="flex flex-col gap-2 p-3">
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -2191,7 +2258,7 @@ export default function FormImageDetail() {
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)} */}
|
||||||
|
|
||||||
{/* {Number(detail?.needApprovalFromLevel) == Number(userLevelId) ||
|
{/* {Number(detail?.needApprovalFromLevel) == Number(userLevelId) ||
|
||||||
(detail?.isInternationalMedia == true &&
|
(detail?.isInternationalMedia == true &&
|
||||||
|
|
|
||||||
|
|
@ -1863,14 +1863,47 @@ export default function FormTeksDetail() {
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Card>
|
</Card>
|
||||||
{Number(roleId) === 14 ? (
|
{Number(roleId) === 14 ? (
|
||||||
// 🔹 Jika roleId = 14 → tampilkan tombol langsung tanpa pengecekan tambahan
|
|
||||||
<div className="flex flex-col gap-2 p-3">
|
<div className="flex flex-col gap-2 p-3">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => actionApproval("2")}
|
onClick={() => actionApproval("2")}
|
||||||
color="primary"
|
color="primary"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<Icon icon="fa:check" className="mr-3" />{" "}
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("3")}
|
||||||
|
className="bg-orange-400 hover:bg-orange-300"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
||||||
|
{t("revision", { defaultValue: "Revision" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("4")}
|
||||||
|
color="destructive"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:times" className="mr-3" />
|
||||||
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : (Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId) ||
|
||||||
|
(detail?.isInternationalMedia === true &&
|
||||||
|
detail?.isForwardFromNational === true &&
|
||||||
|
Number(detail?.statusId) === 1)) &&
|
||||||
|
(Number(detail?.uploadedById) === Number(userId) ||
|
||||||
|
Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId)) ? (
|
||||||
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("2")}
|
||||||
|
color="primary"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
{t("accept", { defaultValue: "Accept" })}
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -1890,37 +1923,6 @@ export default function FormTeksDetail() {
|
||||||
{t("reject", { defaultValue: "Reject" })}
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
) : Number(detail?.needApprovalFromLevel) == Number(userLevelId) ? (
|
|
||||||
Number(detail?.uploadedById) == Number(userId) ? (
|
|
||||||
""
|
|
||||||
) : (
|
|
||||||
<div className="flex flex-col gap-2 p-3">
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("2")}
|
|
||||||
color="primary"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:check" className="mr-3" />{" "}
|
|
||||||
{t("accept", { defaultValue: "Accept" })}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("3")}
|
|
||||||
className="bg-orange-400 hover:bg-orange-300"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
|
||||||
{t("revision", { defaultValue: "Revision" })}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("4")}
|
|
||||||
color="destructive"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:times" className="mr-3" />
|
|
||||||
{t("reject", { defaultValue: "Reject" })}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -1867,14 +1867,48 @@ export default function FormVideoDetail() {
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Card>
|
</Card>
|
||||||
{Number(roleId) === 14 ? (
|
{Number(roleId) === 14 ? (
|
||||||
// 🔹 Jika roleId = 14 → tampilkan tombol langsung tanpa pengecekan lain
|
// 🔹 Jika roleId = 14 → selalu tampilkan tombol tanpa pengecekan tambahan
|
||||||
<div className="flex flex-col gap-2 p-3">
|
<div className="flex flex-col gap-2 p-3">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => actionApproval("2")}
|
onClick={() => actionApproval("2")}
|
||||||
color="primary"
|
color="primary"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<Icon icon="fa:check" className="mr-3" />{" "}
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("3")}
|
||||||
|
className="bg-orange-400 hover:bg-orange-300"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
||||||
|
{t("revision", { defaultValue: "Revision" })}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("4")}
|
||||||
|
color="destructive"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:times" className="mr-3" />
|
||||||
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : (Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId) ||
|
||||||
|
(detail?.isInternationalMedia === true &&
|
||||||
|
detail?.isForwardFromNational === true &&
|
||||||
|
Number(detail?.statusId) === 1)) &&
|
||||||
|
(Number(detail?.uploadedById) === Number(userId) ||
|
||||||
|
Number(detail?.needApprovalFromLevel) ===
|
||||||
|
Number(userLevelId)) ? (
|
||||||
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
<Button
|
||||||
|
onClick={() => actionApproval("2")}
|
||||||
|
color="primary"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Icon icon="fa:check" className="mr-3" />
|
||||||
{t("accept", { defaultValue: "Accept" })}
|
{t("accept", { defaultValue: "Accept" })}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -1894,37 +1928,6 @@ export default function FormVideoDetail() {
|
||||||
{t("reject", { defaultValue: "Reject" })}
|
{t("reject", { defaultValue: "Reject" })}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
) : Number(detail?.needApprovalFromLevel) == Number(userLevelId) ? (
|
|
||||||
Number(detail?.uploadedById) == Number(userId) ? (
|
|
||||||
""
|
|
||||||
) : (
|
|
||||||
<div className="flex flex-col gap-2 p-3">
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("2")}
|
|
||||||
color="primary"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:check" className="mr-3" />{" "}
|
|
||||||
{t("accept", { defaultValue: "Accept" })}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("3")}
|
|
||||||
className="bg-orange-400 hover:bg-orange-300"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:comment-o" className="mr-3" />{" "}
|
|
||||||
{t("revision", { defaultValue: "Revision" })}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => actionApproval("4")}
|
|
||||||
color="destructive"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon icon="fa:times" className="mr-3" />
|
|
||||||
{t("reject", { defaultValue: "Reject" })}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue