fix: call getMeta only when needed
This commit is contained in:
parent
a6479da710
commit
0c561f2d63
@ -75,11 +75,9 @@ export function timeAgo(date) {
|
|||||||
return useTimeAgo(date).value
|
return useTimeAgo(date).value
|
||||||
}
|
}
|
||||||
|
|
||||||
const taskMeta = getMeta('CRM Task')
|
|
||||||
|
|
||||||
export function taskStatusOptions(action, data) {
|
export function taskStatusOptions(action, data) {
|
||||||
let options = ['Backlog', 'Todo', 'In Progress', 'Done', 'Canceled']
|
let options = ['Backlog', 'Todo', 'In Progress', 'Done', 'Canceled']
|
||||||
let statusMeta = taskMeta
|
let statusMeta = getMeta('CRM Task')
|
||||||
.getFields()
|
.getFields()
|
||||||
?.find((field) => field.fieldname == 'status')
|
?.find((field) => field.fieldname == 'status')
|
||||||
if (statusMeta) {
|
if (statusMeta) {
|
||||||
@ -98,7 +96,7 @@ export function taskStatusOptions(action, data) {
|
|||||||
|
|
||||||
export function taskPriorityOptions(action, data) {
|
export function taskPriorityOptions(action, data) {
|
||||||
let options = ['Low', 'Medium', 'High']
|
let options = ['Low', 'Medium', 'High']
|
||||||
let priorityMeta = taskMeta
|
let priorityMeta = getMeta('CRM Task')
|
||||||
.getFields()
|
.getFields()
|
||||||
?.find((field) => field.fieldname == 'priority')
|
?.find((field) => field.fieldname == 'priority')
|
||||||
if (priorityMeta) {
|
if (priorityMeta) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user