fix: mutation on set new default button

refractor: moved all filter option to constants file, style: UI/UX improvement on create-update-issue model when there's an similar issue
This commit is contained in:
Dakshesh Jain
2022-12-21 11:31:51 +05:30
parent a14ad95930
commit f322bcc4b0
5 changed files with 71 additions and 95 deletions

View File

@@ -1,3 +1,5 @@
import type { IIssue, NestedKeyOf } from "types";
export const PRIORITIES = ["urgent", "high", "medium", "low"];
export const ROLE = {
@@ -16,3 +18,36 @@ export const GROUP_CHOICES = {
completed: "Completed",
cancelled: "Cancelled",
};
export const groupByOptions: Array<{ name: string; key: NestedKeyOf<IIssue> | null }> = [
{ name: "State", key: "state_detail.name" },
{ name: "Priority", key: "priority" },
// { name: "Cycle", key: "issue_cycle.cycle_detail.name" },
{ name: "Created By", key: "created_by" },
{ name: "None", key: null },
];
export const orderByOptions: Array<{ name: string; key: NestedKeyOf<IIssue> | null }> = [
{ name: "Last created", key: "created_at" },
{ name: "Last updated", key: "updated_at" },
{ name: "Priority", key: "priority" },
{ name: "None", key: null },
];
export const filterIssueOptions: Array<{
name: string;
key: "activeIssue" | "backlogIssue" | null;
}> = [
{
name: "All",
key: null,
},
{
name: "Active Issues",
key: "activeIssue",
},
{
name: "Backlog Issues",
key: "backlogIssue",
},
];