Merge branch 'develop' of https://github.com/makeplane/plane into refactor/draft_issues

This commit is contained in:
dakshesh14 2023-11-07 14:41:18 +05:30
commit b0413a50f6
9 changed files with 35 additions and 34 deletions

View File

@ -59,6 +59,7 @@ class SlackProjectSyncViewSet(BaseViewSet):
team_id=slack_response.get("team", {}).get("id"), team_id=slack_response.get("team", {}).get("id"),
team_name=slack_response.get("team", {}).get("name"), team_name=slack_response.get("team", {}).get("name"),
workspace_integration=workspace_integration, workspace_integration=workspace_integration,
project_id=project_id,
) )
_ = ProjectMember.objects.get_or_create( _ = ProjectMember.objects.get_or_create(
member=workspace_integration.actor, role=20, project_id=project_id member=workspace_integration.actor, role=20, project_id=project_id

View File

@ -1,11 +1,8 @@
import { useState } from "react"; import { useState } from "react";
import Link from "next/link"; import Link from "next/link";
import Image from "next/image"; import Image from "next/image";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
// hooks // hooks
import useUserAuth from "hooks/use-user-auth"; import useUserAuth from "hooks/use-user-auth";
// services // services
@ -21,7 +18,7 @@ import { IImporterService } from "types";
// fetch-keys // fetch-keys
import { IMPORTER_SERVICES_LIST } from "constants/fetch-keys"; import { IMPORTER_SERVICES_LIST } from "constants/fetch-keys";
// constants // constants
import { IMPORTERS_EXPORTERS_LIST } from "constants/workspace"; import { IMPORTERS_LIST } from "constants/workspace";
// services // services
const integrationService = new IntegrationService(); const integrationService = new IntegrationService();
@ -76,7 +73,7 @@ const IntegrationGuide = () => {
</div> </div>
</a> </a>
</div> */} </div> */}
{IMPORTERS_EXPORTERS_LIST.map((service) => ( {IMPORTERS_LIST.map((service) => (
<div <div
key={service.provider} key={service.provider}
className="flex items-center justify-between gap-2 border-b border-custom-border-100 bg-custom-background-100 px-4 py-6" className="flex items-center justify-between gap-2 border-b border-custom-border-100 bg-custom-background-100 px-4 py-6"

View File

@ -1,25 +1,15 @@
import React, { useState } from "react"; import React, { useState } from "react";
// next
import Link from "next/link"; import Link from "next/link";
import Image from "next/image"; import Image from "next/image";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
// swr
import { mutate } from "swr"; import { mutate } from "swr";
// react hook form
import { FormProvider, useForm } from "react-hook-form"; import { FormProvider, useForm } from "react-hook-form";
// icons // icons
import { ArrowLeft, Check, List, Settings } from "lucide-react"; import { ArrowLeft, Check, List, Settings } from "lucide-react";
// services // services
import { JiraImporterService } from "services/integrations"; import { JiraImporterService } from "services/integrations";
// fetch keys // fetch keys
import { IMPORTER_SERVICES_LIST } from "constants/fetch-keys"; import { IMPORTER_SERVICES_LIST } from "constants/fetch-keys";
// components // components
import { Button, UserGroupIcon } from "@plane/ui"; import { Button, UserGroupIcon } from "@plane/ui";
import { import {
@ -31,9 +21,9 @@ import {
TJiraIntegrationSteps, TJiraIntegrationSteps,
IJiraIntegrationData, IJiraIntegrationData,
} from "."; } from ".";
// assets
import JiraLogo from "public/services/jira.png"; import JiraLogo from "public/services/jira.svg";
// types
import { IUser, IJiraImporterForm } from "types"; import { IUser, IJiraImporterForm } from "types";
const integrationWorkflowData: Array<{ const integrationWorkflowData: Array<{

View File

@ -7,7 +7,7 @@ import { renderShortDateWithYearFormat } from "helpers/date-time.helper";
// types // types
import { IImporterService } from "types"; import { IImporterService } from "types";
// constants // constants
import { IMPORTERS_EXPORTERS_LIST } from "constants/workspace"; import { IMPORTERS_LIST } from "constants/workspace";
type Props = { type Props = {
service: IImporterService; service: IImporterService;
@ -21,10 +21,8 @@ export const SingleImport: React.FC<Props> = ({ service, refreshing, handleDelet
<h4 className="flex items-center gap-2 text-sm"> <h4 className="flex items-center gap-2 text-sm">
<span> <span>
Import from{" "} Import from{" "}
<span className="font-medium"> <span className="font-medium">{IMPORTERS_LIST.find((i) => i.provider === service.service)?.title}</span> to{" "}
{IMPORTERS_EXPORTERS_LIST.find((i) => i.provider === service.service)?.title} <span className="font-medium">{service.project_detail.name}</span>
</span>{" "}
to <span className="font-medium">{service.project_detail.name}</span>
</span> </span>
<span <span
className={`rounded px-2 py-0.5 text-xs capitalize ${ className={`rounded px-2 py-0.5 text-xs capitalize ${

View File

@ -66,9 +66,9 @@ export const IssuePropertyState: React.FC<IIssuePropertyState> = observer((props
value: state.id, value: state.id,
query: state.name, query: state.name,
content: ( content: (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2 w-full overflow-hidden">
<StateGroupIcon stateGroup={state.group} color={state.color} /> <StateGroupIcon stateGroup={state.group} color={state.color} />
{state.name} <div className="truncate inline-block line-clamp-1 w-full">{state.name}</div>
</div> </div>
), ),
})); }));
@ -94,7 +94,7 @@ export const IssuePropertyState: React.FC<IIssuePropertyState> = observer((props
<Tooltip tooltipHeading="State" tooltipContent={value?.name ?? ""} position="top"> <Tooltip tooltipHeading="State" tooltipContent={value?.name ?? ""} position="top">
<div className="flex items-center cursor-pointer w-full gap-2 text-custom-text-200"> <div className="flex items-center cursor-pointer w-full gap-2 text-custom-text-200">
{value && <StateGroupIcon stateGroup={value.group} color={value.color} />} {value && <StateGroupIcon stateGroup={value.group} color={value.color} />}
<span className="truncate">{value?.name ?? "State"}</span> <span className="truncate line-clamp-1 inline-block">{value?.name ?? "State"}</span>
</div> </div>
</Tooltip> </Tooltip>
); );
@ -104,7 +104,7 @@ export const IssuePropertyState: React.FC<IIssuePropertyState> = observer((props
{workspaceSlug && projectId && ( {workspaceSlug && projectId && (
<Combobox <Combobox
as="div" as="div"
className={`flex-shrink-0 text-left ${className}`} className={`flex-shrink-0 text-left w-auto max-w-full ${className}`}
value={value.id} value={value.id}
onChange={(data: string) => { onChange={(data: string) => {
const selectedState = projectStates?.find((state) => state.id === data); const selectedState = projectStates?.find((state) => state.id === data);
@ -159,7 +159,11 @@ export const IssuePropertyState: React.FC<IIssuePropertyState> = observer((props
{({ selected }) => ( {({ selected }) => (
<> <>
{option.content} {option.content}
{selected && <Check className="h-3.5 w-3.5" />} {selected && (
<div className="flex-shrink-0">
<Check className="h-3.5 w-3.5" />
</div>
)}
</> </>
)} )}
</Combobox.Option> </Combobox.Option>

View File

@ -32,10 +32,6 @@ export const ProjectLayoutRoot: React.FC = observer(() => {
} }
); );
console.log("--");
console.log("isLoading -- -->", isLoading);
console.log("--");
const activeLayout = issueFilterStore.userDisplayFilters.layout; const activeLayout = issueFilterStore.userDisplayFilters.layout;
const issueCount = issueStore.getIssuesCount; const issueCount = issueStore.getIssuesCount;

View File

@ -1,6 +1,6 @@
// services images // services images
import GithubLogo from "public/services/github.png"; import GithubLogo from "public/services/github.png";
import JiraLogo from "public/services/jira.png"; import JiraLogo from "public/services/jira.svg";
import CSVLogo from "public/services/csv.svg"; import CSVLogo from "public/services/csv.svg";
import ExcelLogo from "public/services/excel.svg"; import ExcelLogo from "public/services/excel.svg";
import JSONLogo from "public/services/json.svg"; import JSONLogo from "public/services/json.svg";
@ -28,7 +28,7 @@ export const USER_ROLES = [
{ value: "Other", label: "Other" }, { value: "Other", label: "Other" },
]; ];
export const IMPORTERS_EXPORTERS_LIST = [ export const IMPORTERS_LIST = [
{ {
provider: "github", provider: "github",
type: "import", type: "import",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

View File

@ -0,0 +1,15 @@
<svg width="132" height="140" viewBox="0 0 132 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M129.99 66.3078L73.235 9.55259L67.7344 4.05612L5.48285 66.3078C3.44786 68.3483 3.44786 71.6517 5.48285 73.6881L44.515 112.719L67.7344 135.944L129.99 73.6881C132.027 71.6517 132.027 68.3483 129.99 66.3078ZM67.7344 89.4939L48.2399 70.0007L67.7344 50.5005L87.2332 70.0007L67.7344 89.4939Z" fill="#2684FF"/>
<path d="M67.7344 50.5005C54.9714 37.732 54.9062 17.0521 67.5986 4.20861L24.929 46.8617L48.1539 70.0867L67.7344 50.5005Z" fill="url(#paint0_linear_7_1732)"/>
<path d="M87.2873 69.9453L67.7344 89.4939C73.8963 95.6502 77.3619 104.006 77.3619 112.719C77.3619 121.431 73.8963 129.782 67.7344 135.944L110.507 93.1702L87.2873 69.9453Z" fill="url(#paint1_linear_7_1732)"/>
<defs>
<linearGradient id="paint0_linear_7_1732" x1="59.3547" y1="35.6787" x2="37.0275" y2="58.0003" gradientUnits="userSpaceOnUse">
<stop stop-color="#0052CC"/>
<stop offset="1" stop-color="#2684FF"/>
</linearGradient>
<linearGradient id="paint1_linear_7_1732" x1="76.3553" y1="104.104" x2="98.6379" y2="81.8216" gradientUnits="userSpaceOnUse">
<stop stop-color="#0052CC"/>
<stop offset="1" stop-color="#2684FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB