[WEB-4118]fix: adjusted sub work item properties for a better visibility (#7079)
* fix: adjusted sub work item properties for a better visibility * fix: removed projects from sub work item filters
This commit is contained in:
parent
2d0c0c7f8a
commit
84fc81dd98
3 changed files with 10 additions and 31 deletions
|
|
@ -355,7 +355,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||||
sub_work_items: {
|
sub_work_items: {
|
||||||
list: {
|
list: {
|
||||||
display_properties: SUB_ISSUES_DISPLAY_PROPERTIES_KEYS,
|
display_properties: SUB_ISSUES_DISPLAY_PROPERTIES_KEYS,
|
||||||
filters: ["priority", "state", "project", "issue_type", "assignees", "start_date", "target_date"],
|
filters: ["priority", "state", "issue_type", "assignees", "start_date", "target_date"],
|
||||||
display_filters: {
|
display_filters: {
|
||||||
order_by: ["-created_at", "-updated_at", "start_date", "-priority"],
|
order_by: ["-created_at", "-updated_at", "start_date", "-priority"],
|
||||||
group_by: ["state", "priority", "assignees", null],
|
group_by: ["state", "priority", "assignees", null],
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ type Props = TDropdownProps & {
|
||||||
filterAvailableStateIds?: boolean;
|
filterAvailableStateIds?: boolean;
|
||||||
isForWorkItemCreation?: boolean;
|
isForWorkItemCreation?: boolean;
|
||||||
alwaysAllowStateChange?: boolean;
|
alwaysAllowStateChange?: boolean;
|
||||||
|
iconSize?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const StateDropdown: React.FC<Props> = observer((props) => {
|
export const StateDropdown: React.FC<Props> = observer((props) => {
|
||||||
|
|
@ -60,6 +61,7 @@ export const StateDropdown: React.FC<Props> = observer((props) => {
|
||||||
value,
|
value,
|
||||||
renderByDefault = true,
|
renderByDefault = true,
|
||||||
stateIds,
|
stateIds,
|
||||||
|
iconSize = "size-4",
|
||||||
} = props;
|
} = props;
|
||||||
// states
|
// states
|
||||||
const [query, setQuery] = useState("");
|
const [query, setQuery] = useState("");
|
||||||
|
|
@ -101,7 +103,7 @@ export const StateDropdown: React.FC<Props> = observer((props) => {
|
||||||
<StateGroupIcon
|
<StateGroupIcon
|
||||||
stateGroup={state?.group ?? "backlog"}
|
stateGroup={state?.group ?? "backlog"}
|
||||||
color={state?.color}
|
color={state?.color}
|
||||||
className="size-4 flex-shrink-0"
|
className={cn("flex-shrink-0", iconSize)}
|
||||||
percentage={state?.order}
|
percentage={state?.order}
|
||||||
/>
|
/>
|
||||||
<span className="flex-grow truncate text-left">{state?.name}</span>
|
<span className="flex-grow truncate text-left">{state?.name}</span>
|
||||||
|
|
@ -184,7 +186,7 @@ export const StateDropdown: React.FC<Props> = observer((props) => {
|
||||||
<StateGroupIcon
|
<StateGroupIcon
|
||||||
stateGroup={selectedState?.group ?? "backlog"}
|
stateGroup={selectedState?.group ?? "backlog"}
|
||||||
color={selectedState?.color ?? "rgba(var(--color-text-300))"}
|
color={selectedState?.color ?? "rgba(var(--color-text-300))"}
|
||||||
className="size-4 flex-shrink-0"
|
className={cn("flex-shrink-0", iconSize)}
|
||||||
percentage={selectedState?.order}
|
percentage={selectedState?.order}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,10 @@ export const SubIssuesListItemProperties: React.FC<Props> = observer((props) =>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
disabled={!disabled}
|
disabled={!disabled}
|
||||||
buttonVariant="border-with-text"
|
buttonVariant="transparent-without-text"
|
||||||
|
buttonClassName="hover:bg-transparent px-0"
|
||||||
|
iconSize="size-5"
|
||||||
|
showTooltip
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</WithDisplayPropertiesHOC>
|
</WithDisplayPropertiesHOC>
|
||||||
|
|
@ -80,33 +83,7 @@ export const SubIssuesListItemProperties: React.FC<Props> = observer((props) =>
|
||||||
disabled={!disabled}
|
disabled={!disabled}
|
||||||
buttonVariant="border-without-text"
|
buttonVariant="border-without-text"
|
||||||
buttonClassName="border"
|
buttonClassName="border"
|
||||||
/>
|
showTooltip
|
||||||
</div>
|
|
||||||
</WithDisplayPropertiesHOC>
|
|
||||||
|
|
||||||
<WithDisplayPropertiesHOC displayProperties={displayProperties} displayPropertyKey="start_date">
|
|
||||||
<div className="h-5 flex-shrink-0" onFocus={handleEventPropagation} onClick={handleEventPropagation}>
|
|
||||||
<DateDropdown
|
|
||||||
value={issue.start_date ?? null}
|
|
||||||
onChange={(val) =>
|
|
||||||
issue.project_id &&
|
|
||||||
updateSubIssue(
|
|
||||||
workspaceSlug,
|
|
||||||
issue.project_id,
|
|
||||||
parentIssueId,
|
|
||||||
issueId,
|
|
||||||
{
|
|
||||||
start_date: val ? renderFormattedPayloadDate(val) : null,
|
|
||||||
},
|
|
||||||
{ ...issue }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
maxDate={maxDate}
|
|
||||||
placeholder={t("common.order_by.start_date")}
|
|
||||||
icon={<CalendarClock className="h-3 w-3 flex-shrink-0" />}
|
|
||||||
buttonVariant={issue.start_date ? "border-with-text" : "border-without-text"}
|
|
||||||
optionsClassName="z-30"
|
|
||||||
disabled={!disabled}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</WithDisplayPropertiesHOC>
|
</WithDisplayPropertiesHOC>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue