push rasad front on new repo

This commit is contained in:
2026-01-18 14:32:49 +03:30
commit 4fe6e70525
2139 changed files with 303150 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import axios from "axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { getRoleFromUrl } from "../../../utils/getRoleFromUrl";
import { LOADING_END, LOADING_START } from "../../../lib/redux/slices/appSlice";
export const getFileProcess = createAsyncThunk(
"GET_FILE",
async (id, { dispatch }) => {
dispatch(LOADING_START());
const { data, status } = await axios.get(`/Poultry_Request/${id}/`);
dispatch(LOADING_END());
return { data, status };
}
);
export const getFileProcessOther = createAsyncThunk(
"GET_FILE_OTHER",
async (id, { dispatch }) => {
dispatch(LOADING_START());
const { data, status } = await axios.get(
"process/?id=" + id + `&role=${getRoleFromUrl()}`
);
dispatch(LOADING_END());
return { data, status };
}
);