update payment method
This commit is contained in:
@@ -60,7 +60,7 @@ const UpdatePaymentMethod: FC = () => {
|
||||
useEffect(() => {
|
||||
if (restaurantPaymentMethod) {
|
||||
formik.setValues({
|
||||
paymentMethodId: restaurantPaymentMethod.paymentMethodId || '',
|
||||
paymentMethodId: restaurantPaymentMethod.paymentMethod?.id || '',
|
||||
merchantId: restaurantPaymentMethod.merchantId || '',
|
||||
isActive: restaurantPaymentMethod.isActive ?? true,
|
||||
})
|
||||
|
||||
@@ -49,6 +49,9 @@ export const getPaymentMethodTableColumns = ({ onDelete, isDeleting }: GetPaymen
|
||||
{
|
||||
key: 'merchantId',
|
||||
title: 'شناسه مرچنت',
|
||||
render: (item: RestaurantPaymentMethod) => {
|
||||
return item.merchantId || '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'actions',
|
||||
|
||||
@@ -15,16 +15,54 @@ export type PaymentMethod = {
|
||||
|
||||
export type PaymentMethodsResponse = IResponse<PaymentMethod[]>;
|
||||
|
||||
export type GeoJSONPoint = [number, number];
|
||||
|
||||
export type GeoJSONPolygon = {
|
||||
type: "Polygon";
|
||||
coordinates: GeoJSONPoint[][];
|
||||
};
|
||||
|
||||
export type Restaurant = {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: string | null;
|
||||
name: string;
|
||||
slug: string;
|
||||
logo: string | null;
|
||||
address: string | null;
|
||||
menuColor: string | null;
|
||||
latitude: number | null;
|
||||
longitude: number | null;
|
||||
serviceArea: GeoJSONPolygon;
|
||||
isActive: boolean;
|
||||
establishedYear: number | null;
|
||||
phoneNumber: string | null;
|
||||
phone: string;
|
||||
instagram: string | null;
|
||||
telegram: string | null;
|
||||
whatsapp: string | null;
|
||||
description: string | null;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
tagNames: unknown | null;
|
||||
images: unknown | null;
|
||||
vat: number;
|
||||
};
|
||||
|
||||
export type RestaurantPaymentMethodsResponse = IResponse<
|
||||
RestaurantPaymentMethod[]
|
||||
>;
|
||||
|
||||
export type RestaurantPaymentMethod = {
|
||||
id: string;
|
||||
paymentMethodId: string;
|
||||
merchantId: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: string | null;
|
||||
restaurant: Restaurant;
|
||||
paymentMethod: PaymentMethod;
|
||||
merchantId: string | null;
|
||||
isActive: boolean;
|
||||
paymentMethod?: PaymentMethod;
|
||||
};
|
||||
|
||||
export type RestaurantPaymentMethodResponse = IResponse<
|
||||
|
||||
Reference in New Issue
Block a user