|
|
|
@ -1,395 +1,67 @@ |
|
|
|
|
import React from "react"; |
|
|
|
|
import SendForm from "./SendForm"; |
|
|
|
|
import Location from "./Location"; |
|
|
|
|
import History from "./History"; |
|
|
|
|
import React, { useState } from "react"; |
|
|
|
|
|
|
|
|
|
const EditRow = ({ row }) => { |
|
|
|
|
const [openModal, setOpenModal] = useState(true); |
|
|
|
|
|
|
|
|
|
const EditRow = ({ row, columns }) => { |
|
|
|
|
// console.log(columns);
|
|
|
|
|
return ( |
|
|
|
|
<section |
|
|
|
|
className=" border-r-4 border-blue-600 p-2" |
|
|
|
|
style={{ backgroundColor: "#F1F5FE" }} |
|
|
|
|
> |
|
|
|
|
<div className="flex flex-row items-center mr-2 mt-2 mb-4"> |
|
|
|
|
<div |
|
|
|
|
className="w-1 h-4 ml-1 rounded" |
|
|
|
|
style={{ backgroundColor: "#65A9FF" }} |
|
|
|
|
></div> |
|
|
|
|
<p className="text-sm font-bold" style={{ color: "#00253A" }}> |
|
|
|
|
اطلاعات هویتی |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
{/* table data */} |
|
|
|
|
<div className="flex flex-wrap"> |
|
|
|
|
{/* 1 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
نام و نام خانوادگی: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.name} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 2 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
تاریخ سفارش: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.order_date} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 3 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
مبلغ سفارش: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.order_price} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 4 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
شماره سفارش: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.order_number} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 5 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
شغل کاربر: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
onClick={() => setOpenModal(false)} |
|
|
|
|
data-modal-toggle="large-modal" |
|
|
|
|
className={`cursor-pointer w-screen h-screen backdrop-filter backdrop-blur-lg bg-opacity-90 bg-gray-600 flex items-center justify-center fixed left-0 top-0
|
|
|
|
|
${openModal ? "opacity-80" : "opacity-0 pointer-events-none"}`}
|
|
|
|
|
> |
|
|
|
|
{row.user_job} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 6 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
وضعیت سفارش: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.order_status} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 7 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
سطح اهمیت: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.order_level} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 8 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
محل تولد: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.birth_place} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 9 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
تلفن محل کار: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.office_phone} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 10 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
تحصیلات: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.education} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 11 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
تاریخ تولد: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.birth_day} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 12 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
شغل: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.job} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 13 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
<div |
|
|
|
|
className="absolute w-6/12 bg-white p-4 rounded flex flex-row flex-wrap items-center justify-around" |
|
|
|
|
style={{ top: "10%" }} |
|
|
|
|
onClick={(e) => e.stopPropagation()} |
|
|
|
|
> |
|
|
|
|
دانشگاه: |
|
|
|
|
</p> |
|
|
|
|
<img src={row.original.filePic} className="w-20" /> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.uni} |
|
|
|
|
{row.original.fileName} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 14 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
رشته تحصیلی: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.field_study} |
|
|
|
|
{row.original.fileType} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 15 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
اخلاق: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.behaviour} |
|
|
|
|
{row.original.fileSize} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
{/* 16 */} |
|
|
|
|
<div className="flex flex-col my-2 mx-2"> |
|
|
|
|
<p |
|
|
|
|
className="text-xs text-blue-400 mb-2" |
|
|
|
|
style={{ borderColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
نشانی: |
|
|
|
|
</p> |
|
|
|
|
<span |
|
|
|
|
role="textbox" |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: "#F8FBFF", |
|
|
|
|
borderColor: "#C8DEF9", |
|
|
|
|
color: "#00253A", |
|
|
|
|
minWidth: "96px", |
|
|
|
|
}} |
|
|
|
|
className="text-xs rounded-sm border p-2 focus:outline-none focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20" |
|
|
|
|
> |
|
|
|
|
{row.address} |
|
|
|
|
{row.original.fileDate} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{/* title bottom */} |
|
|
|
|
<div className="flex flex-row items-center mr-2 mt-2 mb-4"> |
|
|
|
|
<div |
|
|
|
|
className="w-1 h-4 ml-1 rounded" |
|
|
|
|
style={{ backgroundColor: "#65A9FF" }} |
|
|
|
|
></div> |
|
|
|
|
<p className="text-sm font-bold" style={{ color: "#00253A" }}> |
|
|
|
|
اطلاعات شخصی |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
{/* bottom */} |
|
|
|
|
<div className="flex flex-row items-center"> |
|
|
|
|
{/* right */} |
|
|
|
|
<div className="flex items-center w-10/12"> |
|
|
|
|
{/* map */} |
|
|
|
|
<Location /> |
|
|
|
|
{/* formInput */} |
|
|
|
|
<SendForm /> |
|
|
|
|
{/* previous */} |
|
|
|
|
<History /> |
|
|
|
|
</div> |
|
|
|
|
{/* left */} |
|
|
|
|
<div className="w-2/12 flex justify-end"> |
|
|
|
|
<button |
|
|
|
|
className="border rounded text-sm lg:ml-3 py-2 px-4 text-white" |
|
|
|
|
style={{ backgroundColor: "#65A9FF" }} |
|
|
|
|
> |
|
|
|
|
ذخیره اطلاعات{" "} |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</section> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|