migrate ldap list wrapper fields (#3162)

This commit is contained in:
Dharini committed 2026-06-03 16:36:29 -07:00
1 parent 71ec7b465a
commit 4e2b779d96
12 files changed
+163 -136

No files matched your search

@@ -9,11 +9,6 @@ import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class FormAuthMethodOidcComponent extends Component {
// For fields with just a value property
createEmptyValue = () => ({ value: '' });
// For fields with key and value properties
createEmptyKeyValue = () => ({ key: '', value: '' });
// =attributes
/**
@@ -59,7 +54,6 @@ export default class FormAuthMethodOidcComponent extends Component {
}
//actions
/**
* @param {string} value
*/
@@ -94,34 +88,4 @@ export default class FormAuthMethodOidcComponent extends Component {
this.args.model.prompts = [...removeSelection];
}
}
/**
* Adds a new empty row to account claim maps
*/
@action
addRow(field, emptyRow) {
this.args.model[field] = [...this.args.model[field], emptyRow()];
}
/**
* Removes a row from account claim maps
*/
@action
removeRow(field, emptyRow, rowData) {
let rows = this.args.model[field].filter((item) => item !== rowData);
// Ensure at least one empty row exists for editing
if (rows.length === 0) {
rows = [emptyRow()];
}
this.args.model[field] = rows;
}
/**
* Updates the account claim maps in the model
*/
@action
updateRow(field, rowData, property, { target: { value } }) {
rowData[property] = value;
this.args.model[field] = [...this.args.model[field]];
}
}