This commit is contained in:
Charles 2025-07-25 14:32:02 +02:00
parent d7677db885
commit fcb69f987f
2 changed files with 5 additions and 26 deletions

View File

@ -42,7 +42,7 @@ export default class extends Controller {
const choicesData = this.applicationsArrayValue.map(app => ({
value: app.id,
label: app.name,
customProperties: { icon: app.icon },
customProperties: {icon: app.icon},
selected: this.selectedApplicationIdsValue.includes(app.id)
}));
@ -51,31 +51,9 @@ export default class extends Controller {
removeItemButton: true,
placeholder: true,
placeholderValue: 'Ajouter une ou plusieurs applications',
// callbackOnCreateTemplates: function(template) {
// return {
// // Custom rendering for dropdown choices
// choice: (classNames, data) => {
// return template(`
// <div class="${classNames.item} ${classNames.itemChoice}" data-select-text="${this.config.itemSelectText}" data-choice data-id="${data.id}" data-value="${data.value}" ${data.groupId > 0 ? 'role="treeitem"' : 'role="option"'} >
// ${data.customProperties && data.customProperties.icon ? `<img src="${data.customProperties.icon}" alt="" style="width:20px;height:20px;vertical-align:middle;margin-right:8px;">` : ''}
// ${data.label}
// </div>
// `);
// },
// // Custom rendering for selected items
// item: (classNames, data) => {
// return template(`
// <div class="${classNames.item} ${classNames.itemSelectable}" data-item data-id="${data.id}" data-value="${data.value}" ${data.active ? 'aria-selected="true"' : ''} ${data.disabled ? 'aria-disabled="true"' : ''}>
// ${data.customProperties && data.customProperties.icon ? `<img src="${data.customProperties.icon}" alt="" style="width:20px;height:20px;vertical-align:middle;margin-right:8px;">` : ''}
// ${data.label}
// </div>
// `);
// }
})
}
};
// }
// }
});
}
}
connect() {
this.roleSelect();

View File

@ -43,6 +43,7 @@ class UsersOrganizations
{
$this->apps = new ArrayCollection();
$this->isActive = true; // Default value for isActive
$this->createdAt = new \DateTimeImmutable(); // Set createdAt to current
}
public function getId(): ?int