Add permission checks to SMS payment pages
- Add grant check (57, 'D') to SMS payment download button - Add grant check (57, 'X') to SMS resend button - Refactor onClick handlers for better code organization Changes: - sms-payment-page: Add permission check for download, move onClick to button - sms-payment-detail-resend: Add imports for permission check functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,8 @@ import { SmsPaymentDetailResendProps } from '../../../additional-service/model/s
|
||||
import { useExtensionSmsResendMutation } from '../../api/sms-payment/use-extension-sms-resend-mutation';
|
||||
import appBridge from '@/shared/lib/appBridge';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
|
||||
export const SmsPaymentDetailResend = ({
|
||||
bottomSmsPaymentDetailResendOn,
|
||||
@@ -22,6 +24,10 @@ export const SmsPaymentDetailResend = ({
|
||||
const {mutateAsync : resendMessage } = useExtensionSmsResendMutation();
|
||||
|
||||
const onClickResend = () => {
|
||||
if (!checkGrant(57, 'X')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
// sendMessage가 없으면 재발송 불가
|
||||
if (!smsDetailData?.sendMessage) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user