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

16
src/data/columnsName.js Normal file
View File

@@ -0,0 +1,16 @@
export const columnsName = [
"ردیف",
"کد سفارش",
"کدکاربری",
"تاریخ ثبت درخواست",
"تاریخ کشتار",
"مرغدار",
"تلفن مرغدار",
"شهر",
"استان",
"تاریخ جوجه ریزی",
"سن مرغ",
"تعداد",
"عملیات",
"مشاهده",
];

26
src/data/download-file.js Normal file
View File

@@ -0,0 +1,26 @@
import axios from "axios";
export const downloadFile = (fileUrl) => {
axios({
url: fileUrl,
method: "GET",
responseType: "blob",
})
.then((response) => {
const blob = new Blob([response.data], {
type: response.headers["content-type"],
});
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "filename.xlsx";
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
})
.catch((error) => {
console.error("Error downloading the file:", error);
});
};

15
src/data/roles.js Normal file
View File

@@ -0,0 +1,15 @@
export const ROLES = [
"Admin",
"CityOperator",
"Poultry",
"ProvinceOperator",
"ProvinceFinancial",
"KillHouse",
"KillHouseVet",
"VetFarm",
"Driver",
"ProvinceInspector",
"VetSupervisor",
"Jahad",
"ProvincialGovernment",
];

7
src/data/spacing.js Normal file
View File

@@ -0,0 +1,7 @@
const SPACING = {
TINY: 1,
SMALL: 2,
MEDIUM: 4,
LARGE: 8,
};
export { SPACING };

259
src/data/theme.js Normal file
View File

@@ -0,0 +1,259 @@
import { createTheme } from "@mui/material";
import { faIR } from "@mui/material/locale";
export const theme = createTheme(
{
direction: "rtl",
typography: {
fontFamily: [
"iranyekan",
"-apple-system",
"BlinkMacSystemFont",
'"Segoe UI"',
"Roboto",
'"Helvetica Neue"',
"sans-serif",
"Arial",
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(","),
},
palette: {
primary: {
light: "#E0E7FF",
main: "#244CCC",
dark: "#102159",
contrastText: "#fff",
},
secondary: {
light: "#E6FAF5",
main: "#00CC99",
dark: "#ab003c",
contrastText: "#000",
},
error: {
light: "#EB5757",
main: "#EB5757",
dark: "#EB5757",
contrastText: "#fff",
},
info: {
light: "#17A2B8",
main: "#17A2B8",
dark: "#17A2B8",
contrastText: "#fff",
},
},
breakpoints: {
values: {
xs: 0,
sm: 600,
md: 900,
lg: 1200,
nlg: 1400,
xl: 1536,
nxl: 1700,
xxl: 1920,
xxxl: 2400,
},
},
components: {
MUIDataTableBodyRow: {
styleOverrides: {
root: {
borderBottom: "1px solid #e3e3e3",
},
},
},
MuiFormControl: {
styleOverrides: {
root: {
width: "100%",
},
},
},
MuiFormControlLabel: {
styleOverrides: {
label: {
fontSize: "14px",
},
},
},
MuiOutlinedInput: {
styleOverrides: {
root: {
backgroundColor: "transparent",
"&.Mui-focused": {
backgroundColor: "transparent",
},
},
input: {
backgroundColor: "transparent",
"&:-webkit-autofill": {
WebkitBoxShadow: "0 0 0 100px white inset",
WebkitTextFillColor: "inherit",
},
},
notchedOutline: {
borderColor: "#e6e6e6",
},
},
},
MuiInputLabel: {
styleOverrides: {
asterisk: {
color: "#EB5757",
},
},
},
MuiButton: {
styleOverrides: {
root: ({ theme }) => ({
borderRadius: "8px",
fontWeight: 600,
"&.Mui-disabled": {
backgroundColor: "rgba(36, 76, 204, 0.3)",
color: "rgba(255, 255, 255, 0.7)",
},
fontSize: "17px",
[theme.breakpoints.down("sm")]: {
fontSize: "13px",
},
}),
outlined: {
borderWidth: "2px",
"&:hover": {
borderWidth: "2px",
},
"&.Mui-disabled": {
borderColor: "rgba(36, 76, 204, 0.3)",
color: "rgba(36, 76, 204, 0.5)",
backgroundColor: "transparent",
},
},
},
},
MUIDataTable: {
styleOverrides: {
responsiveBase: {
overflow: "hidden",
},
root: {
boxShadow: "none !important",
width: "100%",
},
},
},
MUIDataTableSearch: {
styleOverrides: {
searchIcon: {
display: "none",
},
main: {
justifyContent: "flex-end",
},
searchText: {
flex: "unset",
},
},
},
MUIDataTablePagination: {
styleOverrides: {
navContainer: {
width: "100%",
display: "inline-block",
},
},
},
MUIDataTableToolbar: {
styleOverrides: {
root: {
alignItems: "center",
},
actions: {
display: "flex",
justifyContent: "flex-end",
flex: "unset",
},
titleText: {
textAlign: "right",
fontSize: "16px",
color: "rgba(0, 0, 0, 0.54)",
},
},
},
MUIDataTableHeadCell: {
styleOverrides: {
toolButton: {
padding: "0px !important",
marginRight: "0px !important",
justifyContent: "center !important",
},
data: ({ theme }) => ({
fontSize: "14px",
[theme.breakpoints.down("sm")]: {
fontSize: "12px",
},
}),
contentWrapper: {
justifyContent: "center",
},
},
},
MuiTableCell: {
styleOverrides: {
head: {
backgroundColor: "#e3e3e3 !important",
textAlign: "center",
},
root: {
justifyContent: "center",
padding: "5px !important",
},
},
},
MuiToolbar: {
styleOverrides: {
root: {},
},
},
MUIDataTableBodyCell: {
styleOverrides: {
root: {
textAlign: "center",
fontSize: "12px",
},
},
},
MuiTablePagination: {
styleOverrides: {
root: {
justifyContent: "center",
display: "flex",
},
toolbar: {
marginTop: "0px",
alignItems: "center",
},
},
},
MuiDrawer: {
styleOverrides: {
paperAnchorBottom: {
borderTopRightRadius: "25px",
borderTopLeftRadius: "25px",
},
},
},
MuiTimeline: {
styleOverrides: {
root: {
gap: "0px !important",
},
},
},
},
},
faIR
);