change format all file

This commit is contained in:
Ehsan
2025-05-18 01:18:35 +03:30
parent 4a57468e26
commit 254d5d4ebd
84 changed files with 721 additions and 651 deletions
+1 -3
View File
@@ -2,9 +2,7 @@ function AnimationTextHead({ text, children }) {
return (
<div className="flex justify-center items-start relative w-fit">
<div className="overflow-hidden mb-[4px] md:mb-[5px] lg:mb-[6px]">
<p
className="text-[#3B3B3B] text-nowrap overflow-hidden text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold"
>
<p className="text-[#3B3B3B] text-nowrap overflow-hidden text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
{text}
</p>
</div>
+1 -1
View File
@@ -14,7 +14,7 @@ function Logo({ isAbsolute, matchedCity }) {
alt="logo"
/>
<p className="text-[#526CAC] text-[14px] lg:text-[16px] font-bold font-kalame">
{matchedCity?.site_name || 'نوبت ۷۲۴'}
{matchedCity?.site_name || "نوبت ۷۲۴"}
</p>
</div>
</Link>
+5 -4
View File
@@ -5,10 +5,11 @@ function Pageguide({ list }) {
<li key={idx} className="flex items-center justify-start gap-1">
<h2
className={`text-[16px] font-normal
${list.length > idx + 1
? "text-[#9B9B9B]"
: "text-[#525252]"
}
${
list.length > idx + 1
? "text-[#9B9B9B]"
: "text-[#525252]"
}
`}
>
{item}
+6 -5
View File
@@ -2,7 +2,8 @@ import { Pagination as PaginationMUI } from "@mui/material";
function Pagination({ page, setPage, list, itemsPerPage }) {
const handleChange = (_, value) => setPage(value);
const count = list && itemsPerPage ? Math.ceil(list.length / itemsPerPage) : 20;
const count =
list && itemsPerPage ? Math.ceil(list.length / itemsPerPage) : 20;
return (
<PaginationMUI
@@ -10,7 +11,7 @@ function Pagination({ page, setPage, list, itemsPerPage }) {
page={page || 1}
onChange={setPage && handleChange}
color="primary"
className={count < 2 && '!hidden'}
className={count < 2 && "!hidden"}
sx={{
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root": {
color: "#616161",
@@ -18,9 +19,9 @@ function Pagination({ page, setPage, list, itemsPerPage }) {
fontWeight: "500",
},
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root.Mui-selected":
{
color: "#F8F8FF",
},
{
color: "#F8F8FF",
},
"& .MuiSvgIcon-root": {
rotate: "180deg !important",
},
+1 -1
View File
@@ -47,7 +47,7 @@ function TimePickerField({ dataChange, isVacation, disable, timeStart, data }) {
const hours = e.$H;
const minute = e.$m;
const newValue = `${handleTwoLength(hours)}:${handleTwoLength(
minute
minute,
)}`;
const newData = data;
+1 -1
View File
@@ -18,7 +18,7 @@ function TimePickerInput({ changeData, handleDisableHours, name, data }) {
const hours = e.$H;
const minute = e.$m;
const newValue = `${handleTwoLength(hours)}:${handleTwoLength(
minute
minute,
)}`;
// setValue(newValue);
changeData(newValue, name);
+2 -2
View File
@@ -83,7 +83,7 @@ function ItemUser({
data.is_like ? data.like - 1 : data.like + 1,
data,
"like",
"is_like"
"is_like",
)
}
>
@@ -105,7 +105,7 @@ function ItemUser({
data.is_dislike ? data.dislike - 1 : data.dislike + 1,
data,
"dislike",
"is_dislike"
"is_dislike",
)
}
>
+17 -11
View File
@@ -11,7 +11,7 @@ function AutoCompleteSelect({
label,
disabled = false,
listboxProps,
sendAll
sendAll,
}) {
return (
<Autocomplete
@@ -22,15 +22,21 @@ function AutoCompleteSelect({
value={value || null}
className="!w-full !rounded-lg auto-complete-selector"
onChange={(e, newValue) => {
updateData && updateData((newValue && sendAll) ? newValue : (newValue && !sendAll) && newValue.label || "", name);
updateData &&
updateData(
newValue && sendAll
? newValue
: (newValue && !sendAll && newValue.label) || "",
name,
);
}}
sx={{
...styleTextSelectRight,
// Hide Icon Number
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
{
display: "none",
},
{
display: "none",
},
"& input[type=number]": {
MozAppearance: "textfield",
},
@@ -49,13 +55,13 @@ function AutoCompleteSelect({
border: "1px solid #D7D7D7",
},
"& .MuiInput-underline:hover:not(.Mui-disabled):before, .MuiOutlinedInput-notchedOutline":
{
borderColor: "#D7D7D7 !important",
},
{
borderColor: "#D7D7D7 !important",
},
"& .muirtl-1kiro5a-MuiInputBase-root-MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":
{
border: "1px solid #5559CE !important",
},
{
border: "1px solid #5559CE !important",
},
"& .MuiOutlinedInput-notchedOutline": {
border: isError ? "1px solid red !important" : "",
},
+20 -8
View File
@@ -1,7 +1,16 @@
import { TextField } from "@mui/material";
import { styleTextSelectRight } from "@/mui";
function Field({ title, error, spaceNull, inputProps, type, dir, value, updateState }) {
function Field({
title,
error,
spaceNull,
inputProps,
type,
dir,
value,
updateState,
}) {
return (
<TextField
label={title}
@@ -13,19 +22,22 @@ function Field({ title, error, spaceNull, inputProps, type, dir, value, updateSt
className="!w-full !mx-auto !bg-[#FFF]"
InputProps={inputProps}
sx={{
'.MuiOutlinedInput-notchedOutline.muirtl-1d3z3hw-MuiOutlinedInput-notchedOutline': {
border: error && '1px solid red !important'
},
".MuiOutlinedInput-notchedOutline.muirtl-1d3z3hw-MuiOutlinedInput-notchedOutline":
{
border: error && "1px solid red !important",
},
...styleTextSelectRight,
// Hide Icon Number
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
{
display: "none",
},
{
display: "none",
},
"& input[type=number]": {
MozAppearance: "textfield",
},
"& .MuiInputBase-input": { padding: spaceNull ? "12.5px 0" : "12.5px 14px" },
"& .MuiInputBase-input": {
padding: spaceNull ? "12.5px 0" : "12.5px 14px",
},
"& .MuiInputBase-root": { borderRadius: "6px !important" },
"& .MuiOutlinedInput-notchedOutline": {
border: "1px solid #E9ECEF !important",
+10 -10
View File
@@ -3,16 +3,16 @@ import { Skeleton } from "@mui/material";
function MultilineLoading({ loading, width, height, children, line }) {
return loading
? Array(line)
.fill({})
.map((_, idx) => (
<Skeleton
className={`${width === "full" ? "!w-full" : ""} !my-2`}
variant="rounded"
height={height}
width={width}
key={idx}
/>
))
.fill({})
.map((_, idx) => (
<Skeleton
className={`${width === "full" ? "!w-full" : ""} !my-2`}
variant="rounded"
height={height}
width={width}
key={idx}
/>
))
: children;
}
@@ -18,10 +18,10 @@ function ButtonFilter({ selected, setOpen }) {
<Location />
</div>
<p
className='text-[#616161] text-[11px] md:text-[14px] leading-[17px] sm:leading-[19px]
md:leading-[22px] lg:leading-[24px] font-medium ml-1 md:mx-1'
className="text-[#616161] text-[11px] md:text-[14px] leading-[17px] sm:leading-[19px]
md:leading-[22px] lg:leading-[24px] font-medium ml-1 md:mx-1"
>
{selected.city || 'شهر'}
{selected.city || "شهر"}
</p>
<div className="w-[16px] h-[16px] md:w-[18px] md:h-[18px] lg:w-[20px] lg:h-[20px] grid place-items-center">
<ArrowBottomH />
+2 -2
View File
@@ -23,9 +23,9 @@ function Content({
};
const handleFilter = () => {
handleSearch && handleSearch('');
handleSearch && handleSearch("");
handleClose();
}
};
return (
<div>
+11 -3
View File
@@ -10,7 +10,15 @@ import statesData from "@/data/state.json";
import citiesData from "@/data/city.json";
import Content from "./Content";
function ModalSearchCity({ children, selected, handleSearch, state, setSelected, open, setOpen }) {
function ModalSearchCity({
children,
selected,
handleSearch,
state,
setSelected,
open,
setOpen,
}) {
const provinceSelected = selected.province;
const states = addLabelToList(statesData);
@@ -22,12 +30,12 @@ function ModalSearchCity({ children, selected, handleSearch, state, setSelected,
useEffect(() => {
if (provinceSelected) {
const selectedState = states.find(
(state) => state.label === provinceSelected
(state) => state.label === provinceSelected,
);
if (selectedState) {
const stateId = selectedState.id;
const filteredCities = cities.filter(
(city) => city.province_id === stateId
(city) => city.province_id === stateId,
);
setFilteredCities(filteredCities);
}
+2 -2
View File
@@ -21,7 +21,7 @@ async function getCroppedImg(imageSrc, pixelCrop) {
ctx.drawImage(
image,
safeArea / 2 - image.width * 0.5,
safeArea / 2 - image.height * 0.5
safeArea / 2 - image.height * 0.5,
);
const data = ctx.getImageData(0, 0, safeArea, safeArea);
@@ -31,7 +31,7 @@ async function getCroppedImg(imageSrc, pixelCrop) {
ctx.putImageData(
data,
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y),
);
return canvas.toDataURL("image/jpeg");