fix: change domain disastages

This commit is contained in:
Sabda Yagra 2025-10-20 09:51:49 +07:00
parent 942b00521c
commit a60e661a6e
6 changed files with 266 additions and 8 deletions

View File

@ -1863,8 +1863,37 @@ export default function FormAudioDetail() {
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</Card> </Card>
{Number(detail?.needApprovalFromLevel) == Number(userLevelId) ? ( {Number(roleId) === 14 ? (
Number(detail?.uploadedById) == Number(userId) ? ( // 🔹 Jika roleId = 14, langsung tampilkan tombol tanpa pengecekan lain
<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) ? (
Number(detail?.uploadedById) === Number(userId) ? (
"" ""
) : ( ) : (
<div className="flex flex-col gap-2 p-3"> <div className="flex flex-col gap-2 p-3">
@ -1897,6 +1926,41 @@ export default function FormAudioDetail() {
) : ( ) : (
"" ""
)} )}
{/* {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>
)
) : (
""
)} */}
</div> </div>
</div> </div>
) : ( ) : (

View File

@ -2126,7 +2126,73 @@ export default function FormImageDetail() {
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</Card> </Card>
{Number(detail?.needApprovalFromLevel) == Number(userLevelId) || {Number(roleId) === 14 ? (
// 🔹 Jika roleId = 14 → 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) ? (
""
) : (
<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?.isInternationalMedia == true &&
detail?.isForwardFromNational == true && detail?.isForwardFromNational == true &&
Number(detail?.statusId) == 1) ? ( Number(detail?.statusId) == 1) ? (
@ -2162,7 +2228,7 @@ export default function FormImageDetail() {
) )
) : ( ) : (
"" ""
)} )} */}
</div> </div>
</div> </div>
) : ( ) : (

View File

@ -1709,7 +1709,6 @@ export default function FormImageUpdate() {
</div> </div>
</div> </div>
{/* Description section (stacked, auto overwrite English when translated) */}
<div className="py-3 space-y-2"> <div className="py-3 space-y-2">
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
<Label> <Label>
@ -1728,6 +1727,7 @@ export default function FormImageUpdate() {
sourceLang: "ID", sourceLang: "ID",
targetLang: "EN", targetLang: "EN",
}); });
console.log("PPP", res)
if (!res.error) { if (!res.error) {
const resultText = const resultText =

View File

@ -1864,7 +1864,35 @@ export default function FormTeksDetail() {
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</Card> </Card>
{Number(detail?.needApprovalFromLevel) == Number(userLevelId) ? ( {Number(roleId) === 14 ? (
// 🔹 Jika roleId = 14 → tampilkan tombol langsung 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) ? (
Number(detail?.uploadedById) == Number(userId) ? ( Number(detail?.uploadedById) == Number(userId) ? (
"" ""
) : ( ) : (
@ -1898,6 +1926,41 @@ export default function FormTeksDetail() {
) : ( ) : (
"" ""
)} )}
{/* {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>
)
) : (
""
)} */}
</div> </div>
</div> </div>
) : ( ) : (

View File

@ -1864,7 +1864,35 @@ export default function FormVideoDetail() {
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</Card> </Card>
{Number(detail?.needApprovalFromLevel) == Number(userLevelId) ? ( {Number(roleId) === 14 ? (
// 🔹 Jika roleId = 14 → tampilkan tombol langsung tanpa pengecekan lain
<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) ? (
Number(detail?.uploadedById) == Number(userId) ? ( Number(detail?.uploadedById) == Number(userId) ? (
"" ""
) : ( ) : (
@ -1898,6 +1926,41 @@ export default function FormVideoDetail() {
) : ( ) : (
"" ""
)} )}
{/* {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>
)
) : (
""
)} */}
</div> </div>
</div> </div>
) : ( ) : (

View File

@ -1,6 +1,8 @@
import axios from "axios"; import axios from "axios";
const baseURL = "https://staging.disestages.com/api"; // const baseURL = "https://staging.disestages.com/api";
const baseURL = "https://new.disestages.com/api";
const axiosNulisAIInstance = axios.create({ const axiosNulisAIInstance = axios.create({
baseURL, baseURL,