fix: profile issue application error (#3496)

* fix: profile issue application error

* chore: app sidebar projects updated to your projects

* fix: profile issues update
This commit is contained in:
Anmol Singh Bhatia 2024-01-29 18:04:25 +05:30 committed by GitHub
parent 00e07443b0
commit 61f92563a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 13 deletions

View File

@ -28,7 +28,7 @@ export const ProfileIssuesKanBanLayout: React.FC = observer(() => {
[EIssueActions.UPDATE]: async (issue: TIssue) => { [EIssueActions.UPDATE]: async (issue: TIssue) => {
if (!workspaceSlug || !userId) return; if (!workspaceSlug || !userId) return;
await issues.updateIssue(workspaceSlug, userId, issue.id, issue); await issues.updateIssue(workspaceSlug, issue.project_id, issue.id, issue, userId);
}, },
[EIssueActions.DELETE]: async (issue: TIssue) => { [EIssueActions.DELETE]: async (issue: TIssue) => {
if (!workspaceSlug || !userId) return; if (!workspaceSlug || !userId) return;

View File

@ -29,7 +29,7 @@ export const ProfileIssuesListLayout: FC = observer(() => {
[EIssueActions.UPDATE]: async (issue: TIssue) => { [EIssueActions.UPDATE]: async (issue: TIssue) => {
if (!workspaceSlug || !userId) return; if (!workspaceSlug || !userId) return;
await issues.updateIssue(workspaceSlug, userId, issue.id, issue); await issues.updateIssue(workspaceSlug, issue.project_id, issue.id, issue, userId);
}, },
[EIssueActions.DELETE]: async (issue: TIssue) => { [EIssueActions.DELETE]: async (issue: TIssue) => {
if (!workspaceSlug || !userId) return; if (!workspaceSlug || !userId) return;

View File

@ -82,17 +82,17 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
if (storeLabels && storeLabels.length > 0) projectLabels = storeLabels; if (storeLabels && storeLabels.length > 0) projectLabels = storeLabels;
const options = projectLabels.map((label) => ({ const options = projectLabels.map((label) => ({
value: label.id, value: label?.id,
query: label.name, query: label?.name,
content: ( content: (
<div className="flex items-center justify-start gap-2 overflow-hidden"> <div className="flex items-center justify-start gap-2 overflow-hidden">
<span <span
className="h-2.5 w-2.5 flex-shrink-0 rounded-full" className="h-2.5 w-2.5 flex-shrink-0 rounded-full"
style={{ style={{
backgroundColor: label.color, backgroundColor: label?.color,
}} }}
/> />
<div className="line-clamp-1 inline-block truncate">{label.name}</div> <div className="line-clamp-1 inline-block truncate">{label?.name}</div>
</div> </div>
), ),
})); }));
@ -106,11 +106,11 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
value.length <= maxRender ? ( value.length <= maxRender ? (
<> <>
{projectLabels {projectLabels
?.filter((l) => value.includes(l.id)) ?.filter((l) => value.includes(l?.id))
.map((label) => ( .map((label) => (
<Tooltip position="top" tooltipHeading="Labels" tooltipContent={label.name ?? ""}> <Tooltip position="top" tooltipHeading="Labels" tooltipContent={label?.name ?? ""}>
<div <div
key={label.id} key={label?.id}
className={`flex overflow-hidden hover:bg-custom-background-80 ${ className={`flex overflow-hidden hover:bg-custom-background-80 ${
!disabled && "cursor-pointer" !disabled && "cursor-pointer"
} h-full max-w-full flex-shrink-0 items-center rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 text-xs`} } h-full max-w-full flex-shrink-0 items-center rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 text-xs`}
@ -122,7 +122,7 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
backgroundColor: label?.color ?? "#000000", backgroundColor: label?.color ?? "#000000",
}} }}
/> />
<div className="line-clamp-1 inline-block w-auto max-w-[100px] truncate">{label.name}</div> <div className="line-clamp-1 inline-block w-auto max-w-[100px] truncate">{label?.name}</div>
</div> </div>
</div> </div>
</Tooltip> </Tooltip>
@ -138,8 +138,8 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
position="top" position="top"
tooltipHeading="Labels" tooltipHeading="Labels"
tooltipContent={projectLabels tooltipContent={projectLabels
?.filter((l) => value.includes(l.id)) ?.filter((l) => value.includes(l?.id))
.map((l) => l.name) .map((l) => l?.name)
.join(", ")} .join(", ")}
> >
<div className="flex h-full items-center gap-1.5 text-custom-text-200"> <div className="flex h-full items-center gap-1.5 text-custom-text-200">

View File

@ -206,7 +206,7 @@ export const ProjectSidebarList: FC = observer(() => {
type="button" type="button"
className="group flex w-full items-center gap-1 whitespace-nowrap rounded px-1.5 text-left text-sm font-semibold text-custom-sidebar-text-400 hover:bg-custom-sidebar-background-80" className="group flex w-full items-center gap-1 whitespace-nowrap rounded px-1.5 text-left text-sm font-semibold text-custom-sidebar-text-400 hover:bg-custom-sidebar-background-80"
> >
Projects Your projects
{open ? ( {open ? (
<ChevronDown className="h-3.5 w-3.5" /> <ChevronDown className="h-3.5 w-3.5" />
) : ( ) : (