forked from github/plane
fix: bugs & improvements (#2998)
* fix: create more toggle in update issue modal * fix: spreadsheet estimate column hide * fix: flickering in all the layouts * fix: logs
This commit is contained in:
parent
be2cf2e842
commit
97bc153ef9
@ -602,16 +602,18 @@ export const IssueForm: FC<IssueFormProps> = observer((props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="-mx-5 mt-5 flex items-center justify-between gap-2 border-t border-custom-border-100 px-5 pt-5">
|
||||
<div
|
||||
className="flex cursor-default items-center gap-1.5"
|
||||
onClick={() => setCreateMore((prevData) => !prevData)}
|
||||
>
|
||||
<div className="flex cursor-pointer items-center justify-center">
|
||||
<ToggleSwitch value={createMore} onChange={() => {}} size="sm" />
|
||||
{!status && (
|
||||
<div
|
||||
className="flex cursor-default items-center gap-1.5"
|
||||
onClick={() => setCreateMore((prevData) => !prevData)}
|
||||
>
|
||||
<div className="flex cursor-pointer items-center justify-center">
|
||||
<ToggleSwitch value={createMore} onChange={() => {}} size="sm" />
|
||||
</div>
|
||||
<span className="text-xs">Create more</span>
|
||||
</div>
|
||||
<span className="text-xs">Create more</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
)}
|
||||
<div className="flex items-center gap-2 ml-auto">
|
||||
<Button
|
||||
variant="neutral-primary"
|
||||
size="sm"
|
||||
|
@ -95,7 +95,7 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props) => {
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full flex flex-col overflow-hidden">
|
||||
{currentView != currentIssueView && loader === "init-loader" ? (
|
||||
{currentView != currentIssueView && (loader === "init-loader" || !getIssues) ? (
|
||||
<div className="w-full h-full flex justify-center items-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
@ -103,7 +103,7 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props) => {
|
||||
<>
|
||||
<GlobalViewsAppliedFiltersRoot />
|
||||
|
||||
{Object.keys(getIssues ?? {}).length == 0 && !loader ? (
|
||||
{Object.keys(getIssues ?? {}).length == 0 ? (
|
||||
<>{/* <GlobalViewEmptyState /> */}</>
|
||||
) : (
|
||||
<div className="w-full h-full relative overflow-auto">
|
||||
|
@ -62,13 +62,13 @@ export const CycleLayoutRoot: React.FC = observer(() => {
|
||||
{cycleStatus === "completed" && <TransferIssues handleClick={() => setTransferIssuesModal(true)} />}
|
||||
<CycleAppliedFiltersRoot />
|
||||
|
||||
{loader === "init-loader" ? (
|
||||
{loader === "init-loader" || !getIssues ? (
|
||||
<div className="w-full h-full flex justify-center items-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{Object.keys(getIssues ?? {}).length == 0 && !loader ? (
|
||||
{Object.keys(getIssues ?? {}).length == 0 ? (
|
||||
<CycleEmptyState workspaceSlug={workspaceSlug} projectId={projectId} cycleId={cycleId} />
|
||||
) : (
|
||||
<div className="h-full w-full overflow-auto">
|
||||
|
@ -47,13 +47,13 @@ export const ModuleLayoutRoot: React.FC = observer(() => {
|
||||
<div className="relative w-full h-full flex flex-col overflow-hidden">
|
||||
<ModuleAppliedFiltersRoot />
|
||||
|
||||
{loader === "init-loader" ? (
|
||||
{loader === "init-loader" || !getIssues ? (
|
||||
<div className="w-full h-full flex justify-center items-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{Object.keys(getIssues ?? {}).length == 0 && !loader ? (
|
||||
{Object.keys(getIssues ?? {}).length == 0 ? (
|
||||
<ModuleEmptyState workspaceSlug={workspaceSlug} projectId={projectId} moduleId={moduleId} />
|
||||
) : (
|
||||
<div className="h-full w-full overflow-auto">
|
||||
|
@ -39,13 +39,13 @@ export const ProjectLayoutRoot: React.FC = observer(() => {
|
||||
<div className="relative w-full h-full flex flex-col overflow-hidden">
|
||||
<ProjectAppliedFiltersRoot />
|
||||
|
||||
{loader === "init-loader" ? (
|
||||
{loader === "init-loader" || !getIssues ? (
|
||||
<div className="w-full h-full flex justify-center items-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{Object.keys(getIssues ?? {}).length == 0 && !loader ? (
|
||||
{Object.keys(getIssues ?? {}).length == 0 ? (
|
||||
<ProjectEmptyState />
|
||||
) : (
|
||||
<div className="w-full h-full relative overflow-auto">
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
// components
|
||||
import { SpreadsheetColumn } from "components/issues";
|
||||
// types
|
||||
@ -31,6 +32,12 @@ export const SpreadsheetColumnsList: React.FC<Props> = observer((props) => {
|
||||
states,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
project: { currentProjectDetails },
|
||||
} = useMobxStore();
|
||||
|
||||
const isEstimateEnabled: boolean = currentProjectDetails?.estimate !== null;
|
||||
|
||||
return (
|
||||
<>
|
||||
{displayProperties.state && (
|
||||
@ -102,7 +109,7 @@ export const SpreadsheetColumnsList: React.FC<Props> = observer((props) => {
|
||||
property="due_date"
|
||||
/>
|
||||
)}
|
||||
{displayProperties.estimate && (
|
||||
{displayProperties.estimate && isEstimateEnabled && (
|
||||
<SpreadsheetColumn
|
||||
displayFilters={displayFilters}
|
||||
disableUserActions={disableUserActions}
|
||||
|
Loading…
Reference in New Issue
Block a user