From 909efc7154cca17f7627a08e8384f2325e2494bb Mon Sep 17 00:00:00 2001 From: mahdi Date: Sun, 22 May 2022 09:45:44 +0430 Subject: [PATCH] update 12 files --- src/components/Tabels/ReactTable4/EditRow.js | 30 +-- .../Tabels/ReactTable4/GlobalFilter.js | 3 +- src/components/Tabels/ReactTable4/History.js | 29 +-- src/components/Tabels/ReactTable4/Location.js | 4 +- .../Tabels/ReactTable4/OrderLevel.js | 78 ++++---- .../Tabels/ReactTable4/OrderStatus.js | 25 +-- .../ReactTable4/RenderRowSubComponent.js | 187 ++++-------------- .../Tabels/ReactTable4/SelectColumnFilter.js | 12 +- .../Tabels/ReactTable4/SelectColumnFilter2.js | 12 +- src/components/Tabels/ReactTable4/SendForm.js | 18 +- src/components/Tabels/ReactTable4/Settings.js | 6 +- .../Tabels/ReactTable4/ShowMoreRows.js | 12 +- 12 files changed, 113 insertions(+), 303 deletions(-) diff --git a/src/components/Tabels/ReactTable4/EditRow.js b/src/components/Tabels/ReactTable4/EditRow.js index 66faa1d..1401190 100644 --- a/src/components/Tabels/ReactTable4/EditRow.js +++ b/src/components/Tabels/ReactTable4/EditRow.js @@ -6,38 +6,21 @@ import History from "./History"; const EditRow = ({ row, columns }) => { // console.log(columns); return ( -
+
-
-

- اطلاعات هویتی -

+
+

اطلاعات هویتی

{/* table data */}
{/* 1 */}
-

+

نام و نام خانوادگی:

{row.name} @@ -45,8 +28,7 @@ const EditRow = ({ row, columns }) => { {/* 2 */}

تاریخ سفارش:

diff --git a/src/components/Tabels/ReactTable4/GlobalFilter.js b/src/components/Tabels/ReactTable4/GlobalFilter.js index ee17e45..55b8d78 100644 --- a/src/components/Tabels/ReactTable4/GlobalFilter.js +++ b/src/components/Tabels/ReactTable4/GlobalFilter.js @@ -31,8 +31,7 @@ export const GlobalFilter = ({ filter, setFilter }) => { onFocus={() => setActiveSearchBox(true)} // onBlur={() => setActiveSearchBox(false)} type="text" - className={`text-xs text-blue-400 rounded focus:outline-none border focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`} - style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }} + className={`text-xs text-blue-400 bg-[#F9FBFF] border-[#B5D6FF] rounded focus:outline-none border focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`} />
); diff --git a/src/components/Tabels/ReactTable4/History.js b/src/components/Tabels/ReactTable4/History.js index 5b421a6..5ece274 100644 --- a/src/components/Tabels/ReactTable4/History.js +++ b/src/components/Tabels/ReactTable4/History.js @@ -4,46 +4,29 @@ const History = ({ sentForms }) => { return (
{/* title */} - - توضیحات قبلی: - + توضیحات قبلی: {/* content */} -
+
{/* {sentForms.slice(0, 4).map((sentForm, index) => ( */} {sentForms.map((sentForm, index) => (
{/* content */}
-

- {sentForm.title} -

-

+

{sentForm.title}

+

تاریخ: - {" "} {sentForm.date}

{/* border */} {Number(index) !== sentForms.length - 1 && ( -
+
)}
))}
{/* left border */} -
+
); }; diff --git a/src/components/Tabels/ReactTable4/Location.js b/src/components/Tabels/ReactTable4/Location.js index f2bc931..c221446 100644 --- a/src/components/Tabels/ReactTable4/Location.js +++ b/src/components/Tabels/ReactTable4/Location.js @@ -3,9 +3,7 @@ import React from "react"; const Location = () => { return (
- - لوکیشن مد نظر: - + لوکیشن مد نظر: - {(() => { - switch(value) { - case 1: - return
- - وضعیت عادی -
; - case 2: - return
- - اعلان سطح هشدار -
; - case 3: - return
- - بررسی و پیگیری -
; - case 4: - return
- - وضعیت بحرانی -
; - default: - return
- - وضعیت پایدار -
; - } - })()} -
- ); - } + return ( +
+ {(() => { + switch (value) { + case 1: + return ( +
+ + وضعیت عادی +
+ ); + case 2: + return ( +
+ + اعلان سطح هشدار +
+ ); + case 3: + return ( +
+ + بررسی و پیگیری +
+ ); + case 4: + return ( +
+ + وضعیت بحرانی +
+ ); + default: + return ( +
+ + وضعیت پایدار +
+ ); + } + })()} +
+ ); +} diff --git a/src/components/Tabels/ReactTable4/OrderStatus.js b/src/components/Tabels/ReactTable4/OrderStatus.js index 91e6ba6..78361fa 100644 --- a/src/components/Tabels/ReactTable4/OrderStatus.js +++ b/src/components/Tabels/ReactTable4/OrderStatus.js @@ -6,46 +6,31 @@ export function OrderStatus({ value }) { {(() => { if (value === 1) { return ( - + ارسال شده ); } else if (value === 2) { return ( - + رسیدگی ); } else if (value === 3) { return ( - + لغو شده ); } else if (value === 4) { return ( - + پیگیری ); } else { return ( - + خطری ); diff --git a/src/components/Tabels/ReactTable4/RenderRowSubComponent.js b/src/components/Tabels/ReactTable4/RenderRowSubComponent.js index ef5a0d5..1384ed7 100644 --- a/src/components/Tabels/ReactTable4/RenderRowSubComponent.js +++ b/src/components/Tabels/ReactTable4/RenderRowSubComponent.js @@ -2,258 +2,145 @@ import React from "react"; const RenderRowSubComponent = ({ columns, addTab, row }) => { return ( -
+
{/* right */} -
+
{/* 1 */}
-
-

+

+

نام و نام خانوادگی: {row.name}

{/* 2 */}
-
-

+

+

تاریخ سفارش: {row.order_date}

{/* 3 */}
-
-

+

+

مبلغ سفارش: {row.order_price}

{/* 4 */}
-
-

+

+

شماره سفارش: {row.order_number}

{/* 5 */}
-
-

+

+

شغل کاربر: {row.user_job}

{/* 6 */}
-
-

- وضعیت سفارش: -

+
+

وضعیت سفارش:

{columns[5].Cell({ value: row.order_status })}
{/* 7 */}
-
-

- سطح اهمیت: -

+
+

سطح اهمیت:

{columns[6].Cell({ value: row.order_level })}
{/* 8 */}
-
-

+

+

محل تولد: {row.birth_place}

{/* 9 */}
-
-

+

+

تلفن محل کار: {row.office_phone}

{/* 10 */}
-
-

+

+

تحصیلات: {row.education}

{/* 11 */}
-
-

+

+

تاریخ تولد: {row.birth_day}

{/* 12 */}
-
-

+

+

شغل: {row.job}

{/* 13 */}
-
-

+

+

دانشگاه: {row.uni}

{/* 14 */}
-
-

+

+

رشته تحصیلی: {row.field_study}

{/* 15 */}
-
-

+

+

اخلاق: {row.behaviour}

{/* 16 */}
-
-

+

+

نشانی: {row.address}

{/* left */} -
-