mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
fix: allow renaming custom field (#803)
* fix: allow renaming custom field * style: change time-to-end icon
This commit is contained in:
@@ -404,12 +404,13 @@ export const editCustomField = async (label: string, newField: Partial<CustomFie
|
||||
throw new Error('Change of field type is not allowed');
|
||||
}
|
||||
|
||||
persistedCustomFields[newField.label] = { ...existingField, ...newField };
|
||||
|
||||
if (existingField.label !== newField.label) {
|
||||
delete persistedCustomFields[existingField.label];
|
||||
customFieldChangelog[label] = newField.label;
|
||||
}
|
||||
|
||||
persistedCustomFields[label] = { ...existingField, ...newField };
|
||||
|
||||
scheduleCustomFieldPersist(persistedCustomFields);
|
||||
invalidateIfUsed(label);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user