refactor
This commit is contained in:
parent
d7677db885
commit
fcb69f987f
|
|
@ -42,7 +42,7 @@ export default class extends Controller {
|
||||||
const choicesData = this.applicationsArrayValue.map(app => ({
|
const choicesData = this.applicationsArrayValue.map(app => ({
|
||||||
value: app.id,
|
value: app.id,
|
||||||
label: app.name,
|
label: app.name,
|
||||||
customProperties: { icon: app.icon },
|
customProperties: {icon: app.icon},
|
||||||
selected: this.selectedApplicationIdsValue.includes(app.id)
|
selected: this.selectedApplicationIdsValue.includes(app.id)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -51,31 +51,9 @@ export default class extends Controller {
|
||||||
removeItemButton: true,
|
removeItemButton: true,
|
||||||
placeholder: true,
|
placeholder: true,
|
||||||
placeholderValue: 'Ajouter une ou plusieurs applications',
|
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() {
|
connect() {
|
||||||
this.roleSelect();
|
this.roleSelect();
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ class UsersOrganizations
|
||||||
{
|
{
|
||||||
$this->apps = new ArrayCollection();
|
$this->apps = new ArrayCollection();
|
||||||
$this->isActive = true; // Default value for isActive
|
$this->isActive = true; // Default value for isActive
|
||||||
|
$this->createdAt = new \DateTimeImmutable(); // Set createdAt to current
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue