refactor: switched priority null -> 'none' (#2166)

This commit is contained in:
Dakshesh Jain 2023-09-13 13:22:31 +05:30 committed by GitHub
parent e58b76c8a6
commit 23e62c83eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -52,7 +52,7 @@ const defaultValues: Partial<IIssue> = {
estimate_point: null, estimate_point: null,
state: "", state: "",
parent: null, parent: null,
priority: null, priority: "none",
assignees: [], assignees: [],
assignees_list: [], assignees_list: [],
labels: [], labels: [],

View File

@ -40,7 +40,7 @@ export const IssuePrioritySelect: React.FC<Props> = ({ value, onChange }) => (
<span> <span>
<PriorityIcon priority={priority} /> <PriorityIcon priority={priority} />
</span> </span>
<span className="capitalize">{priority ?? "None"}</span> <span className="capitalize">{priority}</span>
</div> </div>
</div> </div>
</CustomSelect.Option> </CustomSelect.Option>

View File

@ -39,7 +39,7 @@ export const PrioritySelect: React.FC<Props> = (props) => {
<WebViewModal.Options <WebViewModal.Options
options={ options={
PRIORITIES?.map((priority) => ({ PRIORITIES?.map((priority) => ({
label: priority ? capitalizeFirstLetter(priority) : "None", label: capitalizeFirstLetter(priority),
value: priority, value: priority,
checked: priority === value, checked: priority === value,
onClick: () => { onClick: () => {

View File

@ -21,7 +21,7 @@ export const GROUP_CHOICES = {
cancelled: "Cancelled", cancelled: "Cancelled",
}; };
export const PRIORITIES: TIssuePriorities[] = ["urgent", "high", "medium", "low", null]; export const PRIORITIES: TIssuePriorities[] = ["urgent", "high", "medium", "low", "none"];
export const MONTHS = [ export const MONTHS = [
"January", "January",

View File

@ -248,4 +248,4 @@ export interface IIssueViewProps {
properties: Properties; properties: Properties;
} }
export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | null; export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | "none";