fix(ui): workroom status buttons use RoundedButton's standard primary style
Each status button had its own hardcoded pastel inline style on selection. Replaced with variant="primary"/"default" on RoundedButton, matching every other selection button in the app (mirrors the RN fix for this same screen). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,15 +18,18 @@ import {
|
||||
removeProjectDraft,
|
||||
} from "@/lib/projectDrafts";
|
||||
|
||||
// رنگِ pastel هرکدوم حذف شد: طبق خواستهی کاربر، این چیپها باید استایلِ استانداردِ اپ
|
||||
// (variant="primary" یِ RoundedButton، عینِ بقیهی دکمههای انتخاب) رو داشته باشن، نه
|
||||
// رنگِ مخصوصِ هر وضعیت
|
||||
const STATUS_OPTIONS = [
|
||||
{ key: "received", value: "دریافتی", color: "#B89FFF" },
|
||||
{ key: "unpaid", value: "پرداخت نشده", color: "#ddd" },
|
||||
{ key: "reviewing", value: "در دست بررسی", color: "#E0D891" },
|
||||
{ key: "sent", value: "ارسال شده", color: "#ADF5FF" },
|
||||
{ key: "published", value: "منتشر شده", color: "#ADF5FF" },
|
||||
{ key: "inProgress", value: "در دست اقدام", color: "#E0D891" },
|
||||
{ key: "completed", value: "اتمام پروژه", color: "#B7FFB6" },
|
||||
{ key: "cancelled", value: "کنسل شده", color: "#FFC5C5" },
|
||||
{ key: "received", value: "دریافتی" },
|
||||
{ key: "unpaid", value: "پرداخت نشده" },
|
||||
{ key: "reviewing", value: "در دست بررسی" },
|
||||
{ key: "sent", value: "ارسال شده" },
|
||||
{ key: "published", value: "منتشر شده" },
|
||||
{ key: "inProgress", value: "در دست اقدام" },
|
||||
{ key: "completed", value: "اتمام پروژه" },
|
||||
{ key: "cancelled", value: "کنسل شده" },
|
||||
] as const;
|
||||
|
||||
const Workroom = () => {
|
||||
@@ -76,38 +79,24 @@ const Workroom = () => {
|
||||
<div className="px-4 text-xs md:text-sm">
|
||||
<div className="grid grid-cols-3 gap-2 px-4 text-sm">
|
||||
<RoundedButton
|
||||
variant={showDrafts ? "primary" : "default"}
|
||||
onClick={() => {
|
||||
setShowDrafts(true);
|
||||
setStatusFilter("");
|
||||
}}
|
||||
className={`p-1 text-xs sm:p-2 md:text-sm ${
|
||||
showDrafts ? "text-primary-dark" : ""
|
||||
}`}
|
||||
style={{
|
||||
backgroundColor: showDrafts ? "#FFD6E7" : "",
|
||||
borderColor: showDrafts ? "#FFD6E7" : "",
|
||||
}}
|
||||
className="p-1 text-xs sm:p-2 md:text-sm"
|
||||
>
|
||||
{t("settings.workroom.drafts")}
|
||||
</RoundedButton>
|
||||
{STATUS_OPTIONS.map(({ key, value, color }) => (
|
||||
{STATUS_OPTIONS.map(({ key, value }) => (
|
||||
<RoundedButton
|
||||
key={value}
|
||||
variant={!showDrafts && statusFilter === value ? "primary" : "default"}
|
||||
onClick={() => {
|
||||
setShowDrafts(false);
|
||||
setStatusFilter(value);
|
||||
}}
|
||||
className={`p-1 text-xs sm:p-2 md:text-sm ${
|
||||
!showDrafts && statusFilter === value
|
||||
? " text-primary-dark"
|
||||
: ""
|
||||
}`}
|
||||
style={{
|
||||
backgroundColor:
|
||||
!showDrafts && statusFilter === value ? color : "",
|
||||
borderColor:
|
||||
!showDrafts && statusFilter === value ? color : "",
|
||||
}}
|
||||
className="p-1 text-xs sm:p-2 md:text-sm"
|
||||
>
|
||||
{t(`settings.workroom.statuses.${key}`)}
|
||||
</RoundedButton>
|
||||
|
||||
Reference in New Issue
Block a user