Attach credentialId to location option
parent
1929b23ea8
commit
30183a9dc5
|
@ -298,7 +298,7 @@ export const EventSetupTab = (
|
|||
!validLocations.find((location) => location.type === newLocationType);
|
||||
|
||||
if (canAddLocation) {
|
||||
updateLocationField(index, { type: newLocationType });
|
||||
updateLocationField(index, { type: newLocationType, credentialId: e.credentialId });
|
||||
} else {
|
||||
updateLocationField(index, { type: field.type });
|
||||
showToast(t("location_already_exists"), "warning");
|
||||
|
@ -382,7 +382,7 @@ export const EventSetupTab = (
|
|||
!validLocations.find((location) => location.type === newLocationType);
|
||||
|
||||
if (canAppendLocation) {
|
||||
append({ type: newLocationType });
|
||||
append({ type: newLocationType, credentialId: e.credentialId });
|
||||
setSelectedNewOption(e);
|
||||
} else {
|
||||
showToast(t("location_already_exists"), "warning");
|
||||
|
|
|
@ -88,7 +88,13 @@ export async function getLocationGroupedOptions(
|
|||
teamName: credential.team?.name,
|
||||
}))) {
|
||||
const label = `${app.locationOption.label} ${teamName ? `(${teamName})` : ""}`;
|
||||
const option = { ...app.locationOption, label, icon: app.logo, slug: app.slug };
|
||||
const option = {
|
||||
...app.locationOption,
|
||||
label,
|
||||
icon: app.logo,
|
||||
slug: app.slug,
|
||||
credentialId: app.credential.id,
|
||||
};
|
||||
if (apps[groupByCategory]) {
|
||||
apps[groupByCategory] = [...apps[groupByCategory], option];
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue