fixing
This commit is contained in:
parent
54bc7e36eb
commit
6cb2838015
|
|
@ -121,8 +121,9 @@ export default function FormImageDetail() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userId = getCookiesDecrypt("uie");
|
const userId = getCookiesDecrypt("uie");
|
||||||
const userLevelId = getCookiesDecrypt("ulie");
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
const userLevelName = Cookies.get("state");
|
||||||
const roleId = getCookiesDecrypt("urie");
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
console.log("LALALALA", userLevelName);
|
||||||
const [modalOpen, setModalOpen] = useState(false);
|
const [modalOpen, setModalOpen] = useState(false);
|
||||||
const { id } = useParams() as { id: string };
|
const { id } = useParams() as { id: string };
|
||||||
console.log(id);
|
console.log(id);
|
||||||
|
|
@ -683,8 +684,13 @@ export default function FormImageDetail() {
|
||||||
""
|
""
|
||||||
)} */}
|
)} */}
|
||||||
|
|
||||||
{(detail?.isPublish == false && detail.isPublishOnPolda == true) || (detail?.isPublish == false && detail?.isInternationalMedia == true && Number(detail?.statusId) == 2) ? (
|
{(detail?.isPublish == false &&
|
||||||
|
detail.isPublishOnPolda == true) ||
|
||||||
|
(detail?.isPublish == false &&
|
||||||
|
detail?.isInternationalMedia == true &&
|
||||||
|
Number(detail?.statusId) == 2) ? (
|
||||||
<div className="flex flex-col gap-2 p-3">
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
{userLevelName?.includes("MABES") && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => publishToMabes()}
|
onClick={() => publishToMabes()}
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -692,6 +698,7 @@ export default function FormImageDetail() {
|
||||||
>
|
>
|
||||||
<Icon icon="fa:check" className="mr-3" /> Publish
|
<Icon icon="fa:check" className="mr-3" /> Publish
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
|
|
@ -952,7 +959,10 @@ export default function FormImageDetail() {
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Card>
|
</Card>
|
||||||
{(Number(detail?.needApprovalFromLevel) == Number(userLevelId)) || (detail?.isInternationalMedia == true && detail?.isForwardFromNational == true && Number(detail?.statusId) == 1) ? (
|
{Number(detail?.needApprovalFromLevel) == Number(userLevelId) ||
|
||||||
|
(detail?.isInternationalMedia == true &&
|
||||||
|
detail?.isForwardFromNational == true &&
|
||||||
|
Number(detail?.statusId) == 1) ? (
|
||||||
Number(detail?.uploadedById) == Number(userId) ? (
|
Number(detail?.uploadedById) == Number(userId) ? (
|
||||||
""
|
""
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
|
|
@ -1053,6 +1053,9 @@ export default function FormTaskTaDetail() {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
<div className="mt-6 space-y-2">
|
<div className="mt-6 space-y-2">
|
||||||
<Label>{t("description")}</Label>
|
<Label>{t("description")}</Label>
|
||||||
<Controller
|
<Controller
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,9 @@ const ProfileInfo = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!username) {
|
||||||
|
router.push("/auth");
|
||||||
|
}
|
||||||
console.log("us", username);
|
console.log("us", username);
|
||||||
}, [username]);
|
}, [username]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue