37 lines
937 B
JavaScript
37 lines
937 B
JavaScript
import axios from 'axios';
|
|
import { createAsyncThunk } from '@reduxjs/toolkit';
|
|
import {
|
|
axiosRetailInstanceData,
|
|
axiosCommonInstanceData,
|
|
} from '../AuthenicationToken/AuthenticationToken';
|
|
|
|
const apiUrl = import.meta.env.ENV_API_URL;
|
|
const apiCommonUrl = import.meta.env.ENV_API_URL_COMMON;
|
|
|
|
export const getCompanyData = createAsyncThunk(
|
|
'appAccess/getCompanyData',
|
|
async ({ CompId }) => {
|
|
if (CompId) {
|
|
return await axios.get(`${apiCommonUrl}/company?CompId=${CompId}`);
|
|
}
|
|
}
|
|
);
|
|
|
|
export const getAllApplications = createAsyncThunk(
|
|
'application/getApplicationData',
|
|
async ({ AppId }) => {
|
|
if (AppId) {
|
|
return axios.get(`${apiCommonUrl}/application?AppId=${AppId}`);
|
|
}
|
|
}
|
|
);
|
|
|
|
export const getSalesDetails = createAsyncThunk(
|
|
'PaymentGatewayReceipt/getSalesDetails',
|
|
async ({ SalesId }) => {
|
|
if (SalesId) {
|
|
return axios.get(`${apiUrl}/rePrint?orderId=${SalesId}`);
|
|
}
|
|
}
|
|
);
|