mirror of
https://github.com/makeplane/plane.git
synced 2026-02-24 04:00:14 +01:00
Merge branch 'sync/ce-ee' of github.com:makeplane/plane-ee into develop
This commit is contained in:
@@ -88,6 +88,12 @@ class Command(BaseCommand):
|
||||
"category": "SMTP",
|
||||
"is_encrypted": False,
|
||||
},
|
||||
{
|
||||
"key": "EMAIL_USE_SSL",
|
||||
"value": os.environ.get("EMAIL_USE_SSL", "0"),
|
||||
"category": "SMTP",
|
||||
"is_encrypted": False,
|
||||
},
|
||||
{
|
||||
"key": "OPENAI_API_KEY",
|
||||
"value": os.environ.get("OPENAI_API_KEY"),
|
||||
|
||||
@@ -95,7 +95,7 @@ export const CreateApiTokenForm: React.FC<Props> = (props) => {
|
||||
else {
|
||||
const expiryDate = getExpiryDate(data.expired_at ?? "");
|
||||
|
||||
if (expiryDate) payload.expired_at = renderFormattedPayloadDate(expiryDate);
|
||||
if (expiryDate) payload.expired_at = renderFormattedPayloadDate(new Date(expiryDate));
|
||||
}
|
||||
|
||||
await onSubmit(payload).then(() => {
|
||||
@@ -170,8 +170,8 @@ export const CreateApiTokenForm: React.FC<Props> = (props) => {
|
||||
{value === "custom"
|
||||
? "Custom date"
|
||||
: selectedOption
|
||||
? selectedOption.label
|
||||
: "Set expiration date"}
|
||||
? selectedOption.label
|
||||
: "Set expiration date"}
|
||||
</div>
|
||||
}
|
||||
value={value}
|
||||
@@ -207,8 +207,8 @@ export const CreateApiTokenForm: React.FC<Props> = (props) => {
|
||||
? `Expires ${renderFormattedDate(customDate)}`
|
||||
: null
|
||||
: watch("expired_at")
|
||||
? `Expires ${getExpiryDate(watch("expired_at") ?? "")}`
|
||||
: null}
|
||||
? `Expires ${getExpiryDate(watch("expired_at") ?? "")}`
|
||||
: null}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
ArchiveIssueModal,
|
||||
PeekOverviewIssueAttachments,
|
||||
} from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useUser } from "@/hooks/store";
|
||||
import useKeypress from "@/hooks/use-keypress";
|
||||
@@ -110,11 +112,14 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
||||
{issueId && (
|
||||
<div
|
||||
ref={issuePeekOverviewRef}
|
||||
className={`fixed z-20 flex flex-col overflow-hidden rounded border border-custom-border-200 bg-custom-background-100 transition-all duration-300
|
||||
${peekMode === "side-peek" ? `bottom-0 right-0 top-0 w-full md:w-[50%]` : ``}
|
||||
${peekMode === "modal" ? `left-[50%] top-[50%] h-5/6 w-5/6 -translate-x-[50%] -translate-y-[50%]` : ``}
|
||||
${peekMode === "full-screen" ? `bottom-0 left-0 right-0 top-0 m-4` : ``}
|
||||
`}
|
||||
className={cn(
|
||||
"fixed z-20 flex flex-col overflow-hidden rounded border border-custom-border-200 bg-custom-background-100 transition-all duration-300",
|
||||
{
|
||||
"bottom-0 right-0 top-0 w-full md:w-[50%]": peekMode === "side-peek",
|
||||
"size-5/6 top-[8.33%] left-[8.33%]": peekMode === "modal",
|
||||
"inset-0 m-4": peekMode === "full-screen",
|
||||
}
|
||||
)}
|
||||
style={{
|
||||
boxShadow:
|
||||
"0px 4px 8px 0px rgba(0, 0, 0, 0.12), 0px 6px 12px 0px rgba(16, 24, 40, 0.12), 0px 1px 16px 0px rgba(16, 24, 40, 0.12)",
|
||||
|
||||
@@ -25,8 +25,6 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
|
||||
const { currentProjectDetails } = useProject();
|
||||
const { currentTab, handleCurrentTab } = useProjectInbox();
|
||||
|
||||
if (!workspaceSlug || !projectId) return <></>;
|
||||
|
||||
// No access to inbox
|
||||
if (currentProjectDetails?.inbox_view === false)
|
||||
return (
|
||||
@@ -46,6 +44,8 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
|
||||
handleCurrentTab(navigationTab === "open" ? EInboxIssueCurrentTab.OPEN : EInboxIssueCurrentTab.CLOSED);
|
||||
}, [currentTab, navigationTab, handleCurrentTab]);
|
||||
|
||||
if (!workspaceSlug || !projectId) return <></>;
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col">
|
||||
<PageHead title={pageTitle} />
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import omit from "lodash/omit";
|
||||
import orderBy from "lodash/orderBy";
|
||||
import reverse from "lodash/reverse";
|
||||
import set from "lodash/set";
|
||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||
import { computedFn } from "mobx-utils";
|
||||
@@ -138,21 +137,21 @@ export class ProjectInboxStore implements IProjectInboxStore {
|
||||
|
||||
// helpers
|
||||
inboxIssueSorting = (issues: IInboxIssueStore[]) => {
|
||||
console.log("issues", issues);
|
||||
let inboxIssues: IInboxIssueStore[] = [];
|
||||
let inboxIssues: IInboxIssueStore[] = issues;
|
||||
inboxIssues = orderBy(inboxIssues, "issue.sequence_id", "desc");
|
||||
if (this.inboxSorting?.order_by && this.inboxSorting?.sort_by) {
|
||||
switch (this.inboxSorting.order_by) {
|
||||
case "issue__created_at":
|
||||
if (this.inboxSorting.sort_by === "desc") inboxIssues = orderBy(issues, ["issue", "created_at"]);
|
||||
else inboxIssues = reverse(orderBy(issues, ["issue", "created_at"]));
|
||||
if (this.inboxSorting.sort_by === "desc") inboxIssues = orderBy(inboxIssues, "issue.created_at", "desc");
|
||||
else inboxIssues = orderBy(inboxIssues, "issue.created_at", "asc");
|
||||
case "issue__updated_at":
|
||||
if (this.inboxSorting.sort_by === "desc") inboxIssues = orderBy(issues, ["issue", "updated_at"]);
|
||||
else inboxIssues = reverse(orderBy(issues, ["issue", "updated_at"]));
|
||||
if (this.inboxSorting.sort_by === "desc") inboxIssues = orderBy(inboxIssues, "issue.updated_at", "desc");
|
||||
else inboxIssues = orderBy(inboxIssues, "issue.updated_at", "asc");
|
||||
case "issue__sequence_id":
|
||||
if (this.inboxSorting.sort_by === "desc") inboxIssues = orderBy(issues, ["issue", "sequence_id"]);
|
||||
else inboxIssues = reverse(orderBy(issues, ["issue", "sequence_id"]));
|
||||
if (this.inboxSorting.sort_by === "desc") inboxIssues = orderBy(inboxIssues, "issue.sequence_id", "desc");
|
||||
else inboxIssues = orderBy(inboxIssues, "issue.sequence_id", "asc");
|
||||
default:
|
||||
inboxIssues = orderBy(issues, ["issue", "created_at"]);
|
||||
inboxIssues = inboxIssues;
|
||||
}
|
||||
}
|
||||
return inboxIssues;
|
||||
|
||||
Reference in New Issue
Block a user