payme price calculation update on modal
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// ─── Domain Types ──────────────────────────────────────────────────────────────
|
||||
|
||||
import { PriceCalculate } from '@/features/modals/paymentModal/lib/types';
|
||||
|
||||
export type CheckResult = 'clean' | 'plagiarism_found' | 'pending' | 'failed';
|
||||
|
||||
export interface DocumentData {
|
||||
@@ -13,6 +15,7 @@ export interface DocumentData {
|
||||
results: [];
|
||||
state: 'paid' | 'unpaid';
|
||||
order_id: number;
|
||||
price_calculation?: PriceCalculate;
|
||||
}
|
||||
|
||||
export interface PlagiarismCheckDetail extends DocumentData {
|
||||
|
||||
@@ -6,11 +6,11 @@ import { formatDate } from '../lib/utils';
|
||||
import { useRouter } from '@/shared/config/i18n/navigation';
|
||||
import { useUserPlagiatStore } from '@/shared/zustand/user';
|
||||
import PaymentStatus from '@/widgets/detail/paidStatus';
|
||||
import { PaymentModal } from '@/widgets/paymentModal/ui/Paymentmodal';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { apiRequest } from '@/shared/request/apiRequest';
|
||||
import { links } from '@/shared/request/links';
|
||||
import { toast } from 'react-toastify';
|
||||
import { PaymentModal } from '@/features/modals/paymentModal/ui/Paymentmodal';
|
||||
|
||||
export const HistoryTableRow: React.FC<HistoryTableRowProps> = ({ item }) => {
|
||||
const router = useRouter();
|
||||
@@ -160,7 +160,12 @@ export const HistoryTableRow: React.FC<HistoryTableRowProps> = ({ item }) => {
|
||||
<PaymentModal
|
||||
isOpen={isPaymentOpen}
|
||||
onClose={() => setIsPaymentOpen(false)}
|
||||
hasCertificate={false}
|
||||
price={{
|
||||
service_fee: 41200,
|
||||
discount: 5200,
|
||||
total_price: 36000,
|
||||
currency: 'UZS',
|
||||
}}
|
||||
onConfirmPayment={() => {
|
||||
handleSubmit({ document_id: Number(item.order_id) });
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user