Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
dafbef7d16
commit
02d15830d4
@@ -95,9 +95,12 @@ export function buildVarMap(ctx: LoadedContext): VarMap {
|
||||
}
|
||||
ctx.clientFields.forEach((f) => {
|
||||
m[`client.field.${f.key}`] = f.value;
|
||||
m[`client.custom.${f.key}`] = f.value;
|
||||
});
|
||||
ctx.caseFields.forEach((f) => {
|
||||
m[`case.field.${f.key}`] = f.value;
|
||||
m[`case.custom.${f.key}`] = f.value;
|
||||
m[`custom.${f.key}`] = f.value;
|
||||
});
|
||||
return m;
|
||||
}
|
||||
@@ -128,7 +131,10 @@ export function buildChips(ctx: LoadedContext): VarChip[] {
|
||||
let label = labelMap[key];
|
||||
if (!label) {
|
||||
if (key.startsWith("client.field.")) label = `Client · ${key.replace("client.field.", "")}`;
|
||||
else if (key.startsWith("client.custom.")) label = `Client · ${key.replace("client.custom.", "")}`;
|
||||
else if (key.startsWith("case.field.")) label = `Case · ${key.replace("case.field.", "")}`;
|
||||
else if (key.startsWith("case.custom.")) label = `Case · ${key.replace("case.custom.", "")}`;
|
||||
else if (key.startsWith("custom.")) label = `Case · ${key.replace("custom.", "")}`;
|
||||
else label = key;
|
||||
}
|
||||
out.push({ token: `{{${key}}}`, label, value: m[key] });
|
||||
|
||||
Reference in New Issue
Block a user