권한변경
This commit is contained in:
@@ -104,7 +104,7 @@ export const EscrowDetail = ({
|
||||
|
||||
|
||||
const onClickToShowMailResend = () => {
|
||||
if(checkGrant(menuId, 'X')){
|
||||
if(checkGrant(menuId, ' W')){
|
||||
setDownloadBottomSheetOn(true);
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -130,7 +130,7 @@ export const ListWrap = () => {
|
||||
setSortType(sort);
|
||||
};
|
||||
const onClickToOpenDownloadBottomSheet = () => {
|
||||
if (!checkGrant(menuId, 'X')) {
|
||||
if (!checkGrant(menuId, 'D')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export const ReferenceWrap = () => {
|
||||
const { mutateAsync: vatReturnReferenceRequest } = useVatReturnReferenceRequestMutation();
|
||||
|
||||
const onClickToResquest = () => {
|
||||
if(checkGrant(menuId, 'R')){
|
||||
if(checkGrant(menuId, 'W')){
|
||||
let params: VatReturnReferenceRequestParams = {
|
||||
mid: mid,
|
||||
startDate: startDate,
|
||||
|
||||
@@ -29,7 +29,7 @@ export enum QnaRegisterPropsName {
|
||||
Title = 'Title',
|
||||
Contents = 'Contents',
|
||||
};
|
||||
|
||||
const menuId = 64;
|
||||
export const QnaRegisterPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
@@ -136,7 +136,7 @@ export const QnaRegisterPage = () => {
|
||||
};
|
||||
|
||||
const onClickToRegisterQna = () => {
|
||||
if (!checkGrant(64, 'W')) {
|
||||
if (!checkGrant(menuId, 'W')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,9 @@ import NiceCalendar from '@/shared/ui/calendar/nice-calendar';
|
||||
import { notiBar, snackBar } from '@/shared/lib';
|
||||
import { BillingChargeParams, BillingChargeResponse } from '@/entities/transaction/model/types';
|
||||
import { useKeyboardAware } from '@/shared/lib/hooks/use-keyboard-aware';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
|
||||
const menuId = 34;
|
||||
export const BillingChargePage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
@@ -52,46 +54,52 @@ export const BillingChargePage = () => {
|
||||
};
|
||||
|
||||
const onClickToBillingCharge = () => {
|
||||
if (!billKey) {
|
||||
showAlert('빌키는 필수 입력 항목입니다.');
|
||||
return;
|
||||
}
|
||||
else if (!productName) {
|
||||
showAlert('상품명은 필수 입력 항목입니다.');
|
||||
}
|
||||
else if (!productAmount) {
|
||||
showAlert('상품금액은 필수 입력 항목입니다.');
|
||||
}
|
||||
else if (productAmount <= 0) {
|
||||
showAlert('상품금액은 0보다 커야 합니다.');
|
||||
}
|
||||
else if (!orderNumber) {
|
||||
showAlert('주문번호는 필수 입력 항목입니다.');
|
||||
}
|
||||
else if (!buyerName) {
|
||||
showAlert('구매자명은 필수 입력 항목입니다.');
|
||||
}
|
||||
|
||||
let params: BillingChargeParams = {
|
||||
billKey: billKey,
|
||||
productName: productName,
|
||||
productAmount: productAmount,
|
||||
orderNumber: orderNumber,
|
||||
buyerName: buyerName,
|
||||
paymentRequestDate: moment(paymentRequestDate).format('YYYYMMDD'),
|
||||
installmentMonth: installmentMonth
|
||||
};
|
||||
billingCharge(params).then((rs: BillingChargeResponse) => {
|
||||
snackBar('결제 신청을 성공하였습니다.', function () {
|
||||
navigate(PATHS.transaction.billing.list);
|
||||
}, 3000);
|
||||
|
||||
}).catch((e: any) => {
|
||||
if (e.response?.data?.error?.message) {
|
||||
snackBar(e.response?.data?.error?.message);
|
||||
if(checkGrant(menuId, 'W')){
|
||||
if (!billKey) {
|
||||
showAlert('빌키는 필수 입력 항목입니다.');
|
||||
return;
|
||||
}
|
||||
});
|
||||
else if (!productName) {
|
||||
showAlert('상품명은 필수 입력 항목입니다.');
|
||||
}
|
||||
else if (!productAmount) {
|
||||
showAlert('상품금액은 필수 입력 항목입니다.');
|
||||
}
|
||||
else if (productAmount <= 0) {
|
||||
showAlert('상품금액은 0보다 커야 합니다.');
|
||||
}
|
||||
else if (!orderNumber) {
|
||||
showAlert('주문번호는 필수 입력 항목입니다.');
|
||||
}
|
||||
else if (!buyerName) {
|
||||
showAlert('구매자명은 필수 입력 항목입니다.');
|
||||
}
|
||||
|
||||
let params: BillingChargeParams = {
|
||||
billKey: billKey,
|
||||
productName: productName,
|
||||
productAmount: productAmount,
|
||||
orderNumber: orderNumber,
|
||||
buyerName: buyerName,
|
||||
paymentRequestDate: moment(paymentRequestDate).format('YYYYMMDD'),
|
||||
installmentMonth: installmentMonth
|
||||
};
|
||||
billingCharge(params).then((rs: BillingChargeResponse) => {
|
||||
snackBar('결제 신청을 성공하였습니다.', function () {
|
||||
navigate(PATHS.transaction.billing.list);
|
||||
}, 3000);
|
||||
|
||||
}).catch((e: any) => {
|
||||
if (e.response?.data?.error?.message) {
|
||||
snackBar(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
showAlert(t('common.nopermission'));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const onChangeBillKey = (value: string) => {
|
||||
|
||||
Reference in New Issue
Block a user