add: page and access for send sms

This commit is contained in:
2026-02-21 09:58:34 +03:30
parent 44037758ed
commit b3892b6a8a

View File

@@ -31,6 +31,7 @@ import { TAG_DISTRIBUTION } from "../../routes/paths";
import { DocumentOperation } from "../../components/DocumentOperation/DocumentOperation"; import { DocumentOperation } from "../../components/DocumentOperation/DocumentOperation";
import { DocumentDownloader } from "../../components/DocumentDownloader/DocumentDownloader"; import { DocumentDownloader } from "../../components/DocumentDownloader/DocumentDownloader";
import { useUserProfileStore } from "../../context/zustand-store/userStore"; import { useUserProfileStore } from "../../context/zustand-store/userStore";
import { checkAccess } from "../../utils/checkAccess";
export default function TagActiveDistributions() { export default function TagActiveDistributions() {
const { openModal } = useModalStore(); const { openModal } = useModalStore();
@@ -242,7 +243,8 @@ export default function TagActiveDistributions() {
ارسال نشده ارسال نشده
</span> </span>
), ),
item?.otp_status !== "accept" ? ( item?.otp_status !== "accept" &&
checkAccess({ page: "tag_distribution", access: "Send-Sms" }) ? (
<Grid key={`otp-${item?.id}`} container className="gap-2"> <Grid key={`otp-${item?.id}`} container className="gap-2">
<Button <Button
size="small" size="small"
@@ -273,8 +275,10 @@ export default function TagActiveDistributions() {
</Button> </Button>
)} )}
</Grid> </Grid>
) : ( ) : checkAccess({ page: "tag_distribution", access: "Send-Sms" }) ? (
"احراز شده" "احراز شده"
) : (
"-"
), ),
<Popover key={index}> <Popover key={index}>
<Tooltip title="جزئیات توزیع" position="right"> <Tooltip title="جزئیات توزیع" position="right">