Skip to content

Commit

Permalink
feat(book): edition by form, assistant in edition
Browse files Browse the repository at this point in the history
This commit removes the `AiSuggestion` and `InlineEditBook` components, along with associated templates, reducing complexity in favor of simpler design. It introduces `getTagsString`/`setTagsString` and `getAuthorsString`/`setAuthorsString` methods in the `Book` entity for streamlined tag and author management. Additionally, minor adjustments include dependency updates (e.g., `league/commonmark`) and layout refinements such as modal alignment.
  • Loading branch information
SergioMendolia committed Feb 10, 2025
1 parent 517ca64 commit e6fa1e1
Show file tree
Hide file tree
Showing 28 changed files with 1,491 additions and 867 deletions.
27 changes: 27 additions & 0 deletions assets/controllers/assistant-controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Controller } from '@hotwired/stimulus';
import TomSelect from 'tom-select';
import { getComponent } from '@symfony/ux-live-component';

export default class extends Controller {
async initialize() {
this.component = await getComponent(this.element);

window.addEventListener('select:clear', () => {
console.log('clear');
this.reinitializeTomSelect();
});
}

reinitializeTomSelect() {
const selects = this.element.querySelectorAll('.tomselected');
selects.forEach(select => {
if (select.tomselect) {
const settings = select.tomselect.settings;
console.log(settings);
select.tomselect.sync()
//select.tomselect.destroy();
//new TomSelect(select, settings);
}
})
}
}
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"kiwilan/php-opds": "^2.1",
"knplabs/knp-menu-bundle": "^3.5.0",
"knplabs/knp-paginator-bundle": "^6.6.1",
"league/commonmark": "^2.6",
"liip/imagine-bundle": "^2.10",
"nikic/php-parser": "^5.4",
"phpdocumentor/reflection-docblock": "^5.3",
Expand Down Expand Up @@ -72,6 +73,7 @@
"symfony/webpack-encore-bundle": "^2.0",
"symfony/yaml": "^7.1",
"twig/extra-bundle": "^2.12|^3.0",
"twig/markdown-extra": "^3.19",
"twig/twig": "^2.12|^3.0"
},
"config": {
Expand Down
Loading

0 comments on commit e6fa1e1

Please sign in to comment.