mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 22:09:12 +02:00
Merge branch 'preview' of github.com:makeplane/plane-ee into uat
This commit is contained in:
@@ -32,10 +32,24 @@ class ProjectQuery:
|
||||
self,
|
||||
info: Info,
|
||||
slug: str,
|
||||
type: Optional[str] = "all",
|
||||
) -> list[ProjectType]:
|
||||
project_query = Project.objects.filter(
|
||||
workspace__slug=slug, archived_at__isnull=True
|
||||
)
|
||||
|
||||
if type == "joined":
|
||||
project_query = project_query.filter(
|
||||
Q(
|
||||
project_projectmember__member=info.context.user,
|
||||
project_projectmember__is_active=True,
|
||||
)
|
||||
| Q(
|
||||
created_by=info.context.user,
|
||||
project_projectmember__is_active=True,
|
||||
)
|
||||
)
|
||||
|
||||
projects = await sync_to_async(list)(project_query)
|
||||
return projects
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ class UserFavoritesQuery:
|
||||
)
|
||||
& Q(project__project_projectmember__is_active=True)
|
||||
),
|
||||
~Q(entity_type="view"),
|
||||
)
|
||||
.order_by("-created_at")
|
||||
)
|
||||
@@ -102,7 +103,9 @@ class UserRecentVisitQuery:
|
||||
) -> list[UserRecentVisitType]:
|
||||
recent_visits = await sync_to_async(list)(
|
||||
UserRecentVisit.objects.filter(
|
||||
workspace__slug=slug, user=info.context.user
|
||||
Q(workspace__slug=slug),
|
||||
Q(user=info.context.user),
|
||||
~Q(entity_name="view"),
|
||||
).order_by("-visited_at")
|
||||
)
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class YourWorkQuery:
|
||||
Q(
|
||||
project__project_projectmember__member=info.context.user,
|
||||
project__project_projectmember__is_active=True,
|
||||
state__group__in=["unstarted", "started"],
|
||||
# state__group__in=["unstarted", "started"],
|
||||
assignees__in=[info.context.user],
|
||||
),
|
||||
)
|
||||
|
||||
65
turbo.json
Normal file
65
turbo.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"globalEnv": [
|
||||
"NODE_ENV",
|
||||
"NEXT_PUBLIC_API_BASE_URL",
|
||||
"NEXT_PUBLIC_ADMIN_BASE_URL",
|
||||
"NEXT_PUBLIC_ADMIN_BASE_PATH",
|
||||
"NEXT_PUBLIC_SPACE_BASE_URL",
|
||||
"NEXT_PUBLIC_SPACE_BASE_PATH",
|
||||
"NEXT_PUBLIC_WEB_BASE_URL",
|
||||
"NEXT_PUBLIC_LIVE_BASE_URL",
|
||||
"NEXT_PUBLIC_PLAUSIBLE_DOMAIN",
|
||||
"NEXT_PUBLIC_CRISP_ID",
|
||||
"NEXT_PUBLIC_ENABLE_SESSION_RECORDER",
|
||||
"NEXT_PUBLIC_SESSION_RECORDER_KEY",
|
||||
"NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS",
|
||||
"NEXT_PUBLIC_POSTHOG_KEY",
|
||||
"NEXT_PUBLIC_POSTHOG_HOST",
|
||||
"NEXT_PUBLIC_GOD_MODE",
|
||||
"NEXT_PUBLIC_POSTHOG_DEBUG",
|
||||
"NEXT_PUBLIC_SUPPORT_EMAIL",
|
||||
"SENTRY_AUTH_TOKEN",
|
||||
"SENTRY_ORG_ID",
|
||||
"SENTRY_PROJECT_ID",
|
||||
"NEXT_PUBLIC_SENTRY_ENVIRONMENT",
|
||||
"NEXT_PUBLIC_SENTRY_DSN",
|
||||
"SENTRY_MONITORING_ENABLED",
|
||||
"NEXT_PUBLIC_PRO_PLAN_MONTHLY_PAYMENT_URL",
|
||||
"NEXT_PUBLIC_PRO_PLAN_YEARLY_PAYMENT_URL",
|
||||
"NEXT_PUBLIC_PLANE_ONE_PAYMENT_URL",
|
||||
"NEXT_PUBLIC_PRO_PLAN_MONTHLY_REDIRECT_URL",
|
||||
"NEXT_PUBLIC_PRO_PLAN_YEARLY_REDIRECT_URL",
|
||||
"NEXT_PUBLIC_PRO_SELF_HOSTED_PAYMENT_URL",
|
||||
"NEXT_PUBLIC_PRO_SELF_HOSTED_MONTHLY_PAYMENT_URL"
|
||||
],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": [".next/**", "dist/**"]
|
||||
},
|
||||
"develop": {
|
||||
"cache": false,
|
||||
"persistent": true,
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"dev": {
|
||||
"cache": false,
|
||||
"persistent": true,
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": []
|
||||
},
|
||||
"lint": {
|
||||
"outputs": []
|
||||
},
|
||||
"start": {
|
||||
"cache": false
|
||||
},
|
||||
"clean": {
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import { TDropdownProps } from "./types";
|
||||
|
||||
type Props = TDropdownProps & {
|
||||
clearIconClassName?: string;
|
||||
optionsClassName?: string;
|
||||
icon?: React.ReactNode;
|
||||
isClearable?: boolean;
|
||||
minDate?: Date;
|
||||
@@ -39,6 +40,7 @@ export const DateDropdown: React.FC<Props> = (props) => {
|
||||
buttonVariant,
|
||||
className = "",
|
||||
clearIconClassName = "",
|
||||
optionsClassName = "",
|
||||
closeOnSelect = true,
|
||||
disabled = false,
|
||||
hideIcon = false,
|
||||
@@ -164,7 +166,7 @@ export const DateDropdown: React.FC<Props> = (props) => {
|
||||
<div
|
||||
className={cn(
|
||||
"my-1 bg-custom-background-100 shadow-custom-shadow-rg rounded-md overflow-hidden p-3 z-20",
|
||||
className
|
||||
optionsClassName
|
||||
)}
|
||||
ref={setPopperElement}
|
||||
style={styles.popper}
|
||||
|
||||
@@ -22,6 +22,7 @@ type Props = {
|
||||
icon?: LucideIcon;
|
||||
onClose?: () => void;
|
||||
renderByDefault?: boolean;
|
||||
optionsClassName? : string;
|
||||
} & MemberDropdownProps;
|
||||
|
||||
export const MemberDropdown: React.FC<Props> = observer((props) => {
|
||||
@@ -34,6 +35,7 @@ export const MemberDropdown: React.FC<Props> = observer((props) => {
|
||||
disabled = false,
|
||||
dropdownArrow = false,
|
||||
dropdownArrowClassName = "",
|
||||
optionsClassName = "",
|
||||
hideIcon = false,
|
||||
multiple,
|
||||
onChange,
|
||||
@@ -162,7 +164,7 @@ export const MemberDropdown: React.FC<Props> = observer((props) => {
|
||||
>
|
||||
{isOpen && (
|
||||
<MemberOptions
|
||||
className={className}
|
||||
optionsClassName={optionsClassName}
|
||||
isOpen={isOpen}
|
||||
projectId={projectId}
|
||||
placement={placement}
|
||||
|
||||
@@ -17,6 +17,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
||||
interface Props {
|
||||
className? : string;
|
||||
optionsClassName?: string;
|
||||
projectId?: string;
|
||||
referenceElement: HTMLButtonElement | null;
|
||||
placement: Placement | undefined;
|
||||
@@ -24,7 +25,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export const MemberOptions = observer((props: Props) => {
|
||||
const { projectId, referenceElement, placement, isOpen, className="" } = props;
|
||||
const { projectId, referenceElement, placement, isOpen, optionsClassName="" } = props;
|
||||
// states
|
||||
const [query, setQuery] = useState("");
|
||||
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
|
||||
@@ -95,7 +96,7 @@ export const MemberOptions = observer((props: Props) => {
|
||||
<Combobox.Options data-prevent-outside-click static>
|
||||
<div
|
||||
className={cn("my-1 w-48 rounded border-[0.5px] border-custom-border-300 bg-custom-background-100 px-2 py-2.5 text-xs shadow-custom-shadow-rg focus:outline-none z-20",
|
||||
className)}
|
||||
optionsClassName)}
|
||||
ref={setPopperElement}
|
||||
style={{
|
||||
...styles.popper,
|
||||
|
||||
@@ -328,8 +328,8 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
||||
placeholder="Start date"
|
||||
icon={<CalendarClock className="h-3 w-3 flex-shrink-0" />}
|
||||
buttonVariant={issue.start_date ? "border-with-text" : "border-without-text"}
|
||||
optionsClassName="z-10"
|
||||
disabled={isReadOnly}
|
||||
className="z-10"
|
||||
renderByDefault={isMobile}
|
||||
showTooltip
|
||||
/>
|
||||
@@ -348,8 +348,8 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
||||
buttonVariant={issue.target_date ? "border-with-text" : "border-without-text"}
|
||||
buttonClassName={shouldHighlightIssueDueDate(issue.target_date, stateDetails?.group) ? "text-red-500" : ""}
|
||||
clearIconClassName="!text-custom-text-100"
|
||||
optionsClassName="z-10"
|
||||
disabled={isReadOnly}
|
||||
className="z-10"
|
||||
renderByDefault={isMobile}
|
||||
showTooltip
|
||||
/>
|
||||
@@ -369,7 +369,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
||||
buttonClassName={issue.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""}
|
||||
showTooltip={issue?.assignee_ids?.length === 0}
|
||||
placeholder="Assignees"
|
||||
className="z-10"
|
||||
optionsClassName="z-10"
|
||||
tooltipContent=""
|
||||
renderByDefault={isMobile}
|
||||
/>
|
||||
|
||||
@@ -38,7 +38,7 @@ export const SpreadsheetAssigneeColumn: React.FC<Props> = observer((props: Props
|
||||
}
|
||||
buttonClassName="text-left rounded-none group-[.selected-issue-row]:bg-custom-primary-100/5 group-[.selected-issue-row]:hover:bg-custom-primary-100/10 px-page-x"
|
||||
buttonContainerClassName="w-full"
|
||||
className="z-9"
|
||||
optionsClassName="z-[9]"
|
||||
onClose={onClose}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@ export const SpreadsheetDueDateColumn: React.FC<Props> = observer((props: Props)
|
||||
"text-red-500": shouldHighlightIssueDueDate(issue.target_date, stateDetails?.group),
|
||||
}
|
||||
)}
|
||||
className="z-9"
|
||||
optionsClassName="z-[9]"
|
||||
clearIconClassName="!text-custom-text-100"
|
||||
onClose={onClose}
|
||||
/>
|
||||
|
||||
@@ -40,7 +40,7 @@ export const SpreadsheetStartDateColumn: React.FC<Props> = observer((props: Prop
|
||||
buttonVariant="transparent-with-text"
|
||||
buttonClassName="text-left rounded-none group-[.selected-issue-row]:bg-custom-primary-100/5 group-[.selected-issue-row]:hover:bg-custom-primary-100/10 px-page-x"
|
||||
buttonContainerClassName="w-full"
|
||||
className="z-9"
|
||||
optionsClassName="z-[9]"
|
||||
onClose={onClose}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user