[WEB-1397] refactor: edition specific migration (#4847)
* refactor: edition specific migration * revert: pagination from space endpoints * fix: project publish --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
This commit is contained in:
parent
413d6d21b4
commit
c9cf7cc631
135 changed files with 221 additions and 203 deletions
|
|
@ -7,7 +7,7 @@ import useSWR from "swr";
|
|||
import { LogoSpinner } from "@/components/common";
|
||||
import { IssuesNavbarRoot } from "@/components/issues";
|
||||
// hooks
|
||||
import { usePublish, usePublishList } from "@/hooks/store";
|
||||
import { useIssueFilter, usePublish, usePublishList } from "@/hooks/store";
|
||||
// assets
|
||||
import planeLogo from "@/public/plane-logo.svg";
|
||||
|
||||
|
|
@ -25,8 +25,25 @@ const IssuesLayout = observer((props: Props) => {
|
|||
// store hooks
|
||||
const { fetchPublishSettings } = usePublishList();
|
||||
const publishSettings = usePublish(anchor);
|
||||
const { updateLayoutOptions } = useIssueFilter();
|
||||
// fetch publish settings
|
||||
useSWR(anchor ? `PUBLISH_SETTINGS_${anchor}` : null, anchor ? () => fetchPublishSettings(anchor) : null);
|
||||
useSWR(
|
||||
anchor ? `PUBLISH_SETTINGS_${anchor}` : null,
|
||||
anchor
|
||||
? async () => {
|
||||
const response = await fetchPublishSettings(anchor);
|
||||
if (response.view_props) {
|
||||
updateLayoutOptions({
|
||||
list: !!response.view_props.list,
|
||||
kanban: !!response.view_props.kanban,
|
||||
calendar: !!response.view_props.calendar,
|
||||
gantt: !!response.view_props.gantt,
|
||||
spreadsheet: !!response.view_props.spreadsheet,
|
||||
});
|
||||
}
|
||||
}
|
||||
: null
|
||||
);
|
||||
|
||||
if (!publishSettings) return <LogoSpinner />;
|
||||
|
||||
|
|
|
|||
8
space/ce/store/root.store.ts
Normal file
8
space/ce/store/root.store.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// store
|
||||
import { CoreRootStore } from "@/store/root.store";
|
||||
|
||||
export class RootStore extends CoreRootStore {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ import { Search, X } from "lucide-react";
|
|||
import { IStateLite } from "@plane/types";
|
||||
import { IIssueLabel, IIssueFilterOptions, TIssueFilterKeys } from "@/types/issue";
|
||||
// components
|
||||
import { FilterPriority, FilterState } from "./";
|
||||
import { FilterPriority, FilterState } from ".";
|
||||
|
||||
type Props = {
|
||||
filters: IIssueFilterOptions;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Calendar, GanttChartSquare, Kanban, List, Sheet } from "lucide-react";
|
||||
import { Kanban, List } from "lucide-react";
|
||||
// types
|
||||
import { TIssuePriorities } from "@plane/types";
|
||||
import { TIssueLayout, TIssueFilterKeys, TIssueFilterPriorityObject } from "@/types/issue";
|
||||
|
|
@ -29,9 +29,9 @@ export const ISSUE_LAYOUTS: {
|
|||
}[] = [
|
||||
{ key: "list", title: "List", icon: List },
|
||||
{ key: "kanban", title: "Kanban", icon: Kanban },
|
||||
{ key: "calendar", title: "Calendar", icon: Calendar },
|
||||
{ key: "spreadsheet", title: "Spreadsheet", icon: Sheet },
|
||||
{ key: "gantt", title: "Gantt chart", icon: GanttChartSquare },
|
||||
// { key: "calendar", title: "Calendar", icon: Calendar },
|
||||
// { key: "spreadsheet", title: "Spreadsheet", icon: Sheet },
|
||||
// { key: "gantt", title: "Gantt chart", icon: GanttChartSquare },
|
||||
];
|
||||
|
||||
export const issuePriorityFilters: TIssueFilterPriorityObject[] = [
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue