Add permission checks and localization to ARS pages
- Add grant check (52, 'D') to ARS list download button - Add grant check (52, 'X') to ARS payment request button - Add grant check (52, 'X') to ARS detail SMS resend button - Refactor inline onClick handlers to method references - Replace hardcoded Korean text with i18n translation keys in ARS detail page Changes: - ars/list-page: Add permission checks for download and payment request - ars/detail-page: Add permission check for SMS resend, localize all UI text Localized fields: - Page title, transaction info, payment method, payment status, order status - Order date/time, product name, order number, buyer, phone number, email - Verification code, SMS resend button and success/error messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,8 @@ import { useExtensionAccessCheck } from '@/shared/lib/hooks/use-extension-access
|
||||
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||
import { ArsList } from '@/entities/additional-service/ui/ars/ars-list';
|
||||
import { ArsDetail } from '@/entities/additional-service/ui/ars/detail/ars-detail';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
|
||||
export const ArsListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -136,6 +138,10 @@ export const ArsListPage = () => {
|
||||
};
|
||||
|
||||
const onClickToOpenEmailBottomSheet = () => {
|
||||
if (!checkGrant(52, 'D')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
@@ -170,6 +176,10 @@ export const ArsListPage = () => {
|
||||
};
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
if (!checkGrant(52, 'X')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
navigate(PATHS.additionalService.ars.request, {
|
||||
state: { mid }
|
||||
});
|
||||
@@ -230,7 +240,7 @@ export const ArsListPage = () => {
|
||||
<button
|
||||
className="download-btn"
|
||||
aria-label={t('common.download')}
|
||||
onClick={() => onClickToOpenEmailBottomSheet()}
|
||||
onClick={onClickToOpenEmailBottomSheet}
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
@@ -272,7 +282,7 @@ export const ArsListPage = () => {
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
onClick={onClickToNavigate}
|
||||
>{t('additionalService.ars.paymentRequest')}</button>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user