forked from github/plane
fix: bug fixes (#2607)
* fix: module card issue count fix * fix: project kanban view add issue bug fix * fix: draft issue modal button alignment fix
This commit is contained in:
parent
0072160891
commit
7f3dbe298c
@ -73,7 +73,7 @@ export const ConfirmIssueDiscard: React.FC<Props> = (props) => {
|
|||||||
Discard
|
Discard
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-x-2">
|
<div className="flex items-center gap-2">
|
||||||
<Button variant="neutral-primary" onClick={onClose}>
|
<Button variant="neutral-primary" onClick={onClose}>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -105,6 +105,7 @@ export const KanBanLayout: React.FC = observer(() => {
|
|||||||
displayProperties={displayProperties}
|
displayProperties={displayProperties}
|
||||||
kanBanToggle={issueKanBanViewStore?.kanBanToggle}
|
kanBanToggle={issueKanBanViewStore?.kanBanToggle}
|
||||||
handleKanBanToggle={handleKanBanToggle}
|
handleKanBanToggle={handleKanBanToggle}
|
||||||
|
enableQuickIssueCreate
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<KanBanSwimLanes
|
<KanBanSwimLanes
|
||||||
|
@ -37,7 +37,14 @@ export const ModuleCardItem: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
const { module: moduleStore } = useMobxStore();
|
const { module: moduleStore } = useMobxStore();
|
||||||
|
|
||||||
const completionPercentage = (module.completed_issues / module.total_issues) * 100;
|
const moduleTotalIssues =
|
||||||
|
module.backlog_issues +
|
||||||
|
module.unstarted_issues +
|
||||||
|
module.started_issues +
|
||||||
|
module.completed_issues +
|
||||||
|
module.cancelled_issues;
|
||||||
|
|
||||||
|
const completionPercentage = (module.completed_issues / moduleTotalIssues) * 100;
|
||||||
|
|
||||||
const endDate = new Date(module.target_date ?? "");
|
const endDate = new Date(module.target_date ?? "");
|
||||||
const startDate = new Date(module.start_date ?? "");
|
const startDate = new Date(module.start_date ?? "");
|
||||||
@ -47,15 +54,13 @@ export const ModuleCardItem: React.FC<Props> = observer((props) => {
|
|||||||
const moduleStatus = MODULE_STATUS.find((status) => status.value === module.status);
|
const moduleStatus = MODULE_STATUS.find((status) => status.value === module.status);
|
||||||
|
|
||||||
const issueCount =
|
const issueCount =
|
||||||
module.completed_issues && module.total_issues
|
moduleTotalIssues === 0
|
||||||
? module.total_issues === 0
|
? "0 Issue"
|
||||||
? "0 Issue"
|
: moduleTotalIssues === module.completed_issues
|
||||||
: module.total_issues === module.completed_issues
|
? moduleTotalIssues > 1
|
||||||
? module.total_issues > 1
|
? `${moduleTotalIssues} Issues`
|
||||||
? `${module.total_issues} Issues`
|
: `${moduleTotalIssues} Issue`
|
||||||
: `${module.total_issues} Issue`
|
: `${module.completed_issues}/${moduleTotalIssues} Issues`;
|
||||||
: `${module.completed_issues}/${module.total_issues} Issues`
|
|
||||||
: "0 Issue";
|
|
||||||
|
|
||||||
const handleAddToFavorites = (e: React.MouseEvent<HTMLButtonElement>) => {
|
const handleAddToFavorites = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -158,7 +163,7 @@ export const ModuleCardItem: React.FC<Props> = observer((props) => {
|
|||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-1.5 text-custom-text-200">
|
<div className="flex items-center gap-1.5 text-custom-text-200">
|
||||||
<LayersIcon className="h-4 w-4 text-custom-text-300" />
|
<LayersIcon className="h-4 w-4 text-custom-text-300" />
|
||||||
<span className="text-xs text-custom-text-300">{issueCount}</span>
|
<span className="text-xs text-custom-text-300">{issueCount ?? "0 Issue"}</span>
|
||||||
</div>
|
</div>
|
||||||
{module.members_detail.length > 0 && (
|
{module.members_detail.length > 0 && (
|
||||||
<Tooltip tooltipContent={`${module.members_detail.length} Members`}>
|
<Tooltip tooltipContent={`${module.members_detail.length} Members`}>
|
||||||
|
Loading…
Reference in New Issue
Block a user